Validating radio button checked

It appears form validation does not include support for validating radio buttons so I have come up with a solution.


Using both type of form we will see how to create radio button and checkbox, fetch values and set them checked and validate them.

To check for the possibility of the user leaving the entire group unchecked, an additional if statement only needs to test the variable "found_it" for a value of null. Remember - comparison operators compare two operands for equality. The not operator evaluates a null value in the same way it evaluates a false value, so it can be used to test found_it to see if it has been assigned a value.

The if/else can be constructed in two different ways using two different operators. To keep from becoming confused by the not operator, just think of it as a shorthand way of saying, "found_it==false".

the Selected Text) is displayed using Java Script Alert Message Box. Net Question Answer site, specially started to allow visitors of this site ask their doubts and queries. Just click the Ask Now button and ask your question now.

Here Mudassar Ahmed Khan has explained with an example, how to use Java Script with Check Box List in ASP. This article will explain how to validate Check Box List to check whether its items are selected or not and also how to get the Selected Items i.e. Now you can ask questions directly to me on my new site ASPForums.

In this example, we alert the user to please check a radio button.


  1. Pingback:

  2. eric   •  

    The pair squashed rumours of a split last November when Katy shared a video of Orlando joining her family for Thanksgiving.

  3. eric   •  

    The central questions this research study intends to answer are: what is the user’s experience of the online dating community, POF?

  4. eric   •  

    To the single people of Toronto, beware: online dating is highly addictive but with all of the spoils come some hilarious experiences.

  5. eric   •  

    Update 2014-02-11 The original plan for ESR was to do 3 extended support releases and then potentially EOL that branch and its associated resources.

  6. eric   •  

    Secondly, those aforementioned bad guys are morons. They defeat fully grown men in martial art combat at every turn.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>