Basic validation on an ASP.net page

Posted on 2003-03-19
Medium Priority
Last Modified: 2006-11-17
I have a ASP.net page that offers the user 3 radio buttons. Alongside each radio button is a list box of values. The idea is that the user may select a radio button choice (they are mutually exclusive). Having selected a radio button, they MUST then select a value from the corresponding list box - they should not be allowed to select the radio button and then not select a value from the list box that's alongside.

How can I put validation in place to ensure this happens ?

I'm using VB.net as the code behind language.

Question by:ggale
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 44

Expert Comment

ID: 8166218
you can add a Custom Validator control to your page, and then supply the nexessary Sub to actaully carry out the validation.  Check in the Help System for the Custom Validator control on the ASP.NET page.

You will find the Custom Validator in the Toolbox

Accepted Solution

krisme77 earned 1000 total points
ID: 8168690
you could assign a validator each to the list boxes and make them inactive initally. You could then check the radio buttons for a selection and then make the corresponding listbox validator active.

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question