Getting value from html radio button - in aspx-c#

groxxxenstern

New Member
I have the following HTML source\[code\]<form name="Register1" action="Register.aspx" id="registerform" method="post" runat="server" style="margin-top: 15px;"> <input type="radio" name="Gender" value="http://stackoverflow.com/questions/15700148/male" />male <input type="radio" name="Gender" value="http://stackoverflow.com/questions/15700148/female" />female</form>\[/code\]My question is how can I get the selected value to variable in the c# page?I tried this : \[code\]Gender = Request.Form["Gender"].ToString();\[/code\]But it didn't work...
 
Back
Top