as the browser only posts back the name/value pair for a selected radio
button. so you need to set a unique value for each one.
<input type=radio id="radio1" name="category" value="1"/>
<input type=radio id="radio2" name="category" value="2"/>
<input type=radio id="radio3" name="category" value="3"/>
<input type=radio id="radio4" name="category" value="4"/>
<input type=radio id="radio5" name="category" value="5"/>
if radio2 is selected the browser will post category=2. you can check in the
selected value in the code behind by check Request.Form["category"]. it will
equal the value of the selected radio button.
-- bruce (sqlwork.com)
"darrel" <no*****@hotmail.com> wrote in message
news:ee**************@TK2MSFTNGP09.phx.gbl...
I'm using some standard HTML radio buttons (to allow finer javascript
interaction) on a web page and would like to catch the selected item on
postback. Since they are all ID's uniquely, is there a way to grab only
the
selected item's value? Or do I need to write an if/then statement to
figure
out which one is selected?
Sample:
<input runat="server" id="radio1" name="category" />
<input runat="server" id="radio2" name="category" />
<input runat="server" id="radio3" name="category" />
<input runat="server" id="radio4" name="category" />
<input runat="server" id="radio5" name="category" />
-Darrel