Posted: March 2nd, 2008, 16:54
You want to do what to berk?
That's sickening!
That's sickening!
HereComesPete wrote:You want to do what to berk?
That's sickening!
I dont understand this methodor even more effeicentCode: Select all
Public ReadOnly Property lblName2 as Label Get Dim o as control = Me.FindControl("lblName2") If o Is Nothing then Return Nothing Return Ctype(o,Label) End Get End Property
The properties method is not recommended when you do not want to limit the number of labels.Code: Select all
Private _lblName2 as Label = Nothing Public ReadOnly Property lblName2 as Label Get If _lblName2 Is Nothing Then _lblName2 = Me.FindControl("lblName2") End If Return _lblName2 End Get End Property
Oh and the other methoderror BC30456: 'FindControl' is not a member of 'Teams.Scr2'
Well it breaks on myControl.ID as it gives me this errorWhen you add a control, do something like this:
Code: Select all
Dim myControl As New Label myControl.ID="lblName2" Me.Controls.Add(MyControl)
error BC30456: 'ID' is not a member of 'System.Windows.Forms.Label'.
Code: Select all
Dim myControl As New Label
myControl.Name = "lblName2"
Me.Controls.Add(myControl)
Code: Select all
Me.Controls.Find("lblName2")
Code: Select all
CType(Scr2.Controls.Find(lblName), Label).Text = txtTeamName(1).Text
&error BC30455: Argument not specified for parameter 'searchAllChildren' of 'Public Function Find(key As String, searchAllChildren As Boolean) As System.Windows.Forms.Control()'.
I can fix the first error by changing code toerror BC30311: Value of type '1-dimensional array of Teams.lblch' cannot be converted to 'String'.
Code: Select all
CType(Scr2.Controls.Find(lblName, true), Label).Text = txtTeamName(1).Text
Make him learn Turbo Pascal, then some useful language like C++.Wiggy wrote:Anyone know anything to do with VB.Net? I have a mate who's looking for some help with a program he's trying to make.
TP = SHIT I know I have used itBaliame wrote:
Make him learn Turbo Pascal, then some useful language like C++.