• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 199
  • Last Modified:

what would be the code if nothing is selected from the radiobuttonlist

Hello everyone,

            I want to show a message like "You must select 1 item in order to process" from a radiobutton list, what would be the code for that.

For example,

What is the primary objective of this campaign?
0 Lead generation
0 Image Building
Next Page

But in order to go to next page, the client has to select atleast one item. If nothing is selected, then I would want to show them a message saying that :You must select at least 1 item in order to go to next question.

Thank you all in advance.
1 Solution
Carl TawnSystems and Integration DeveloperCommented:
Your simplest option would be to add a RequiredFieldValidator to your form and set its ControlToValidate property to your RadioButtonList.
siddhuoopsAuthor Commented:
Thanks a lot.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now