validation on items of radiobuttonlist in jsp

  • Thread starter rishi pariahr via .NET 247
  • 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.
 
B

Brock Allen

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).
 
M

Mona

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]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top