Validating checkboxlist asp net c
It is using j Query to do get the control and finding if anything is checked.$(source).parent() will get parent DOM element of the Custom Validator control that fired the Validate CBL function.So I think I have the "findcontrol" coded correctly..?
On the custom function, you just have to have something like: public void check Check Box(object o, Server Validate Event Args e) I like this solution much better. I am guessing you like the first one since you mention about buttons. If you have multiple buttons, you just double-click on the one that you want to call the validating function. I'll look more into create user wizard control since i've never used it before. In this validate function (Accept Terms Check Box Validation), you have to dig deep into your Create User Wizard Control to get your checkbox and check to see if it is checked. But, I have a problem with emails and usernames not needing to be unique.
You could use this to build something more complex for your application in the future.
First prise would've been if you could attach a requiredfieldvalidator to it, but ok, you can't So then, I decided on the following: After my Checkboxlist was databound, I would recursively search through all the child controls, to add a clientside click events to all the checkboxes.
And then it finds any table that has an id ending with _Check Box List1.
It’s because by default CBL is rendered as and table.