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
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
An ASP.NET Web Form User Control is not newly introduced in ASP.NET. In fact, it was an old technology yet still playing a role to generate web content, especially when we want to use it to have a better and easy way to control part of the web conte…
The video will let you know the exact process to import OST/PST files to the cloud based Office 365 mailboxes. Using Kernel Import PST to Office 365 tool, one can quickly import numerous OST/PST files to Office 365. Besides this, the tool also comes…
Watch the video to know the simple way to remove or recover or reset lost or forgotten passwords of Outlook PST file. With Kernel Outlook Password Recovery tool such operation is very easy to perform. It is a freeware with limitation to use with 500…
Suggested Courses

607 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