validation on items of radiobuttonlist in jsp

  • Thread starter Thread starter rishi pariahr via .NET 247
  • Start date Start date
R

rishi pariahr via .NET 247

how to make validation on items of radiobuttonlist for checked or not in jsp,when these items are populated from database.
 
You can use a <asp:RequiredFieldValidator> to insure that there is a selected
value. If this doesn't do exactly what you want there are other validation
controls, including a <asp:CustomValidator> where you can implement your
own custom validation logic (both client-side and server-side).

-Brock
DevelopMentor
http://staff.develop.com/ballen
 
Hello Rishi,

For the radiobuttonlist,you can iterate through all the conrols, and pass the ClientId property to a javascript function.
You basically create the javascript in a string in the codebehind, and in this string, you keep adding the clientid of each radio button.
Once that string is ready, you can add it to the page. The string you create will have the function, which does the validation
the function contains all the radio buttons to check for.

HTH

Mona[Grapecity]
 
Back
Top