value of type cannot be converted to system.web.ui

yostephy

New Member
it works when I try to write this:<BR><BR>Protected WithEvents Label1 As System.Web.UI.WebControls.Label<BR>Dim aaa As WebControls.Label = Label1<BR>aaa.Text = "nothing"<BR><BR>but not:<BR><BR>Dim svar As String = "label1"<BR>Dim aaa As WebControls.Label = svar<BR>aaa.Text = "nothing"<BR><BR>can anybody help me? i must use string variable to convert to webcontrols.label variable because I have too many labels. or there are some other ways to control many labels. thank you
 
Back
Top