as for server events the default option is the SelectedIndexCanged event.
what are you trying to accomplish with a click event that a selected index change event could not do?
i have a checkboxlist and a checkbox control. When the user selects the checkbox, it unchecks all selected items in the checkboxlist and alternatively if any item on the checkboxlist is selected, then it unchecks checkbox. I can accomplish this in code but this also requires that the controls postback each time. The page has several of these controls so my main goal really is to accomplish the process without posting back the page each time a control is clicked. I'll try your solution, I have a javascript function that runs if added to the checkbox through the html but the asp checkboxlist doesn't have this attribute.
well i got this to work now. What i ended up doing was placing each checkbox in its own anchor tag, and then making the javascript function call through the anchor tag's onclick event.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.