Setting the Checkbox text
-
Hi, I have an array like this: string[3] arr; arr[0]="ck1"; arr[1]="ck2";, arr[2]= "ck3".. Now In my aspx page I have 3 checkboxes. Now I want to set the Checkbox text from the array arr values (for the first checbox text as arr[0]. like this) instead of setting the text while declaring the checkboxes. Thanks in advance.
-
Hi, I have an array like this: string[3] arr; arr[0]="ck1"; arr[1]="ck2";, arr[2]= "ck3".. Now In my aspx page I have 3 checkboxes. Now I want to set the Checkbox text from the array arr values (for the first checbox text as arr[0]. like this) instead of setting the text while declaring the checkboxes. Thanks in advance.
there is a read/write property "Text" for checkbox. So what is the problem is setting the text ? You can set it like checkbox1.Text = arr[0].ToString()
Ranjith Stephen