We help IT Professionals succeed at work.

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

siddhuoops
siddhuoops asked
on
Medium Priority
218 Views
Last Modified: 2010-04-16
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.
Comment
Watch Question

Senior Systems and Integration Developer
CERTIFIED EXPERT
Commented:
Your simplest option would be to add a RequiredFieldValidator to your form and set its ControlToValidate property to your RadioButtonList.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
Thanks a lot.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.