T
T.
Hi group, I am adding an event hander dynamically to a check box inside of
a repeater_itemdatabound method:
Dim chk as CheckBox = CType(e.Item.FindControl("chkIsBilling"), CheckBox)
If Not IsNothing(chk) Then
AddHandler chk.CheckedChanged, AddressOf
IsBillingAddressCheckBox_CheckChanged
End If
here's the handler:
Private Sub IsBillingAddressCheckBox_CheckChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs)
'code
End Sub
The event handler is never called...any thoughts? I can fix it by creating
a reference in the aspx to a protected method, i.e.,
OnCheckChanged="ProtectedMethod_CheckChanged". But why doesn't the dynamic
handler work, any thoughts?
Thanks
a repeater_itemdatabound method:
Dim chk as CheckBox = CType(e.Item.FindControl("chkIsBilling"), CheckBox)
If Not IsNothing(chk) Then
AddHandler chk.CheckedChanged, AddressOf
IsBillingAddressCheckBox_CheckChanged
End If
here's the handler:
Private Sub IsBillingAddressCheckBox_CheckChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs)
'code
End Sub
The event handler is never called...any thoughts? I can fix it by creating
a reference in the aspx to a protected method, i.e.,
OnCheckChanged="ProtectedMethod_CheckChanged". But why doesn't the dynamic
handler work, any thoughts?
Thanks