views:

105

answers:

2

i need to restrict users selecting check boxes multiple times, only one check box should be seleted in my asp.net form ,

i am not using a checkbox list

Please help

+1  A: 

Use something like this:

<input type="radio" name="foo" value="bar1" id="bar1"> <label for="bar1">Bar One</label>
<input type="radio" name="foo" value="bar2" id="bar2"> <label for="bar2">Bar Two</label>
<input type="radio" name="foo" value="bar3" id="bar3"> <label for="bar3">Bar Three</label>
Jacob R
A: 

Use Javascript. Call a method whenever a CheckBox is clicked that takes the ID of that CheckBox as an argument and then unchecks all other Checkboxes in the given context.

Olaf