Assuming you have the following model:
public class MyModel
{
public bool RdPageType { get; set; }
}
Your controller might look like this:
public class HomeController : Controller
{
public ActionResult Index()
{
// Action to render the form, initialize the model
// with some default value
var model = new MyModel
{
RdPageType = true
};
return View(model);
}
[HttpPost]
public ActionResult Index(MyModel model)
{
// Action called when the form is posted
// model.RdPageType will depend on the radio
// being selected
return View(model);
}
}
And the view:
<% using (Html.BeginForm()) { %>
<%= Html.RadioButtonFor(m => m.RdPageType, true, new {id = "rdPageType" }) %>
<%= Html.RadioButtonFor(m => m.RdPageType, false, new {id = "rdPageType12" }) %>
<input type="submit" value="OK" />
<% } %>