Net validating checkbox
This is what I did: I created a dummy textbox and put the ID of the checkboxlist as the value inside the text box. I sent the textbox as the control to validate, and then got the ID of my "real" control to validate from the value that was sent to the validation function, and used it to find my checkbox list and perform the validation checks. In such situations you should validate check box-selections before submitting the form.Use following multiple check box selection example to study the in Java Script. First you have to select at least 3 mobile phone manufactures from first check box group.i dnt want to give for txtbox i want to give for radiobutton...in one of my form it is not compulsory to fill empid and recdvia...empid is a textboxand recdvia is a radiobuttonlistso for user thes two field are not compulsory but if the user is entering empid and he/she must hav to select recdvia so i want to give validation on recdvia if the user is entering empid then he has to select the recdvia if he/she not selecting then vl prompt message that please select recdvia.......It turned out that the validation does not work for Checkbox List.I found the following article about it: claims that there are 3 possible solutions: implement the validation not using the validation controls, use custom validation controls and write the validation methods, or create a custom control that does the validation the same way as the validation controls provided by the ASP. Since the third option is out of my scope for this project, I chose the second option, using the custom validation control.
However, when I created a custom validation control and set the control to validate as my checkbox list, I got the same exception again - a checkbox list cannot be the control to validate, even for a custom validation control.