Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Member
83 Points
268 Posts
Apr 29, 2012 04:49 AM|LINK
I have 2 radio buttons in my view:
<input type="radio" name="gender" id="female" />Female <input type="radio" name="gender" id="male" />Male
How do I get the option the user selected in my controller? I did something like
public ActionResult GenderView(string male, string female) { }
but those variables were always null. How do I read the selection from the controller?
caligali
Member
83 Points
268 Posts
Binding radio button selection to entity
Apr 29, 2012 04:49 AM|LINK
I have 2 radio buttons in my view:
<input type="radio" name="gender" id="female" />Female <input type="radio" name="gender" id="male" />Malepublic ActionResult GenderView(string male, string female) { }and learning..