S
suma kn via .NET 247
(Type your message here)
hi,
im using checkboxlist control in my aspx page, and my code is as follows
/*********
int i as integer
For i = 0 To CheckBoxList2.Items.Count - 1
If CheckBoxList2.Items(i).Selected Then
' List the selected items
s = s & CheckBoxList2.Items(i).Text
s = s & "<br>"
End If
Next
Label1.Text = s.ToString
**********/
but im getting a error saying "Object reference not set to an instance of an object" inspiteof selecting the items in the checkboxlist,plz help me out.., its very urgent.
i have written this code in click event of the button.
hi,
im using checkboxlist control in my aspx page, and my code is as follows
/*********
int i as integer
For i = 0 To CheckBoxList2.Items.Count - 1
If CheckBoxList2.Items(i).Selected Then
' List the selected items
s = s & CheckBoxList2.Items(i).Text
s = s & "<br>"
End If
Next
Label1.Text = s.ToString
**********/
but im getting a error saying "Object reference not set to an instance of an object" inspiteof selecting the items in the checkboxlist,plz help me out.., its very urgent.
i have written this code in click event of the button.