R
Rob C
Hi all,
I am dynamically creating checkboxes and am having trouble getting them to launch the OnCheckedChanged event when they are clicked. I am am getting a Postback event when they are checked or unchecked but that is all.
Here is the code I am using to create my checkboxes in the Page_load function:
For i = 0 To 5
Dim cell As New TableCell()
Row.Cells.Add(cell)
Dim cb As New CheckBox()
cb.ID = "cb" & i
cb.AutoPostBack = True
cb.Checked = True
cb.Attributes.Add("OnCheckedChanged", "cbCheckChanged")
cell.Controls.Add(cb)
Next i
If I add a checkbox to the apsx page manually then it calls the event just fine.
All help is appreciated.
Rob C.
I am dynamically creating checkboxes and am having trouble getting them to launch the OnCheckedChanged event when they are clicked. I am am getting a Postback event when they are checked or unchecked but that is all.
Here is the code I am using to create my checkboxes in the Page_load function:
For i = 0 To 5
Dim cell As New TableCell()
Row.Cells.Add(cell)
Dim cb As New CheckBox()
cb.ID = "cb" & i
cb.AutoPostBack = True
cb.Checked = True
cb.Attributes.Add("OnCheckedChanged", "cbCheckChanged")
cell.Controls.Add(cb)
Next i
If I add a checkbox to the apsx page manually then it calls the event just fine.
All help is appreciated.
Rob C.