Author: Dobly | Posted on: 1/11/2009 5:48:39 PM | Views : 286

 
I am dynamically writing out checkboxes on a page.
 
I have 2 link buttons on the page that sets a boolean variable to True or False. This boolen is set in Page_PreInit and is used to Select or Deselect all the Checkboxes as they are written out. A Select ALL, Deselect ALL type of thing. At least that is the plan.
As the page is being written out I do this for each checkbox and then add it to a table cell control that it added to a table row and on. tc is the table cell.

 

Dim chkItem As CheckBox = New CheckBox
chkItem.ID = "chkRecommend" + drMember("ID")

chkItem.Checked = bChecked
tc.Controls.Add(chkItem)  
 Where bChecked is that boolean I mentioned above. ...

Go to the complete details ...