Hi
Try the following:
Private iCounter As Int32 = 0
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArg s) 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.CheckedChange d, AddressOf ChkboxChecked
Dim tCell As New TableCell
tCell.Controls. Add(a)
Dim tRow As New TableRow
tRow.Cells.Add( tCell)
tblTest.Rows.Ad d(tRow)
End Sub
Public Sub ChkboxChecked(B yVal Sender As Object, ByVal e As
System.EventArg s)
Dim lsthold As CheckBox = CType(Sender, CheckBox)
Dim a As String
a = "Test"
End Sub
"RA" <rc************ ***@storis.com> wrote in message
news:u%******** ********@TK2MSF TNGP15.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.CheckedChange d, AddressOf ChkboxChecked
Dim tCell As New TableCell
tCell.Controls. Add(a)
Dim tRow As New TableRow
tRow.Cells.Add( tCell)
tblTest.Rows.Ad d(tRow)
End Sub
Public Sub ChkboxChecked(B yVal Sender As Object, ByVal e As
System.EventArg s)
'
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.