RadioButtonFor in ASP.NET MVC 2

Posted by Larsenal on Stack Overflow See other posts from Stack Overflow or by Larsenal
Published on 2010-04-06T22:06:21Z Indexed on 2010/04/06 23:13 UTC
Read the original article Hit count: 4491

Can someone provide a simple example of how to properly use Html.RadioButtonFor? Let's say it's a simple scenario where my model has a string property named Gender. I want to display two radio buttons: "Male" and "Female".

What is the most clean way to implement this while retaining the selected value in an Edit view?

© Stack Overflow or respective owner

Related posts about asp.net-mvc-2

Related posts about radiobuttonfor