Hi
Try the following:
Private iCounter As Int32 = 0
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim i As Int32
For i = 0 To 10
FillTable()
Next
End Sub
Private Sub FillTable()
Dim a As New CheckBox
iCounter += 1
a.ID = "chkTest" + CStr(iCounter)
a.AutoPostBack = True
AddHandler a.CheckedChanged, AddressOf ChkboxChecked
Dim tCell As New TableCell
tCell.Controls.Add(a)
Dim tRow As New TableRow
tRow.Cells.Add(tCell)
tblTest.Rows.Add(tRow)
End Sub
Public Sub ChkboxChecked(ByVal Sender As Object, ByVal e As
System.EventArgs)
Dim lsthold As CheckBox = CType(Sender, CheckBox)
Dim a As String
a = "Test"
End Sub
"RA" <rc***************@storis.com> wrote in message
news:u%****************@TK2MSFTNGP15.phx.gbl...
I have simpe code as follows.
Private sub Page_load.....
FillTable()
End Sub
Private Sub FillTable()
'
Dim a As New CheckBox
a.ID = "chkTest"
AddHandler a.CheckedChanged, AddressOf ChkboxChecked
Dim tCell As New TableCell
tCell.Controls.Add(a)
Dim tRow As New TableRow
tRow.Cells.Add(tCell)
tblTest.Rows.Add(tRow)
End Sub
Public Sub ChkboxChecked(ByVal Sender As Object, ByVal e As
System.EventArgs)
'
Dim lsthold As CheckBox = CType(Sender, CheckBox)
Dim a As String
a = "Test"
End Sub
I have breakpoint in ChkboxChecked procedure and it never gets hit.