Link to home
Create AccountLog in
Avatar of ramrocket
ramrocket

asked on

Checkbox in a repeater not firing event

I have a checkbox in a repeater.  I need it to call my event handler in the code when the user clicks on it.
I tried onlick & onserverclick events with no luck.

<input type="checkbox" id="chkBox1" runat="server"  onclick="OnClickCheckBox"

event handler:
protected void OnClickCheckBox(object oSender, EventArgs oEventArgs)
{
   int x=0; << does not go here!
}
Avatar of margajet24
margajet24
Flag of Singapore image

aren't you suppose to use ASP controls?.. and not HTML elements?..

i think if you want to handle the event, use javascript..
ASKER CERTIFIED SOLUTION
Avatar of margajet24
margajet24
Flag of Singapore image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer