repeater
-
hi, i have a repeater control with checl boxes and labels. i am able check if check box is checked or not but iam unable to get the value in label. my code is Dim lb1 As String lb1 = (CType(Repeater1.Items(0).Controls(2), System.Web.UI.WebControls.Label)).Text plz help me
-
hi, i have a repeater control with checl boxes and labels. i am able check if check box is checked or not but iam unable to get the value in label. my code is Dim lb1 As String lb1 = (CType(Repeater1.Items(0).Controls(2), System.Web.UI.WebControls.Label)).Text plz help me
What error are you getting? Are you sure your
Label
controls are at position index 2 in theControls
collection? -
What error are you getting? Are you sure your
Label
controls are at position index 2 in theControls
collection?hi, label is at position 4. type cas error is occured. specific type cast not allowed
-
hi, label is at position 4. type cas error is occured. specific type cast not allowed
The other aspect to this is the context in which you want your code to run. Is this in an event handler? Please describe more if so. The code you indicated before showed index 2, not 4... is that where your invalid type cast is occuring?