hello,
am trying to loop through checkboxes, but getting an error, in the red line below and also with this
Dim b As CheckBox = ’ DirectCast(a, CheckBox)
please help
thanks
M
Compiler Error Message: BC30311: Value of type ‘String’ cannot be converted to ‘System.Web.UI.WebControls.CheckBox’.
Source Error:
Line 323: For i = 1 To incArray.GetUpperBound(0)
Line 324: Dim a As String = “chkInc” + i.ToString()
Line 325: Dim b As CheckBox = CType(a, CheckBox)
Line 326: b.Checked = True
Line 327: Next i