Click here to Skip to main content
15,672,088 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have taken 3 radiobutton but we can select all buttons i want to select only one radio at one time.i am using mvc4 with razor.plz help me?
Updated 25-Mar-14 20:40pm

Share this answer
Akinmade Bond 26-Mar-14 2:48am    
+ That's a better solution given that he uses ASP.
Thanks. :)
You have to group all the radio buttons that are related.

To do that, you give them all the same name.

For example.

Male:   <input type="radio" name="gender" value="male">
Female: <input type="radio" name="gender" value="female">

They can have different ids but they need to have the same name

In your case, you would have three radio buttons with the same name, different ids and, different values.
Share this answer
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900