How to create RadioButton in ASP.NET MVC ?

The ASP.NET MVC Framework provides the helper method RadioButton and RadioButtonFor to create radio button in ASP.NET MVC web page.

How to create RadioButton in ASP.NET MVC ?

Below is a sample sourecode snippet demonstrating how to create RadioButton in ASP.NET MVC .

View

@model MvcApplication1.Models.EmployeeVM

@{

ViewBag.Title = "Index";

}

<h2>@ViewBag.ApplicationTitle</h2>

@Html.Label("AbundantCode-a Programming Directory")

@Html.RadioButtonFor(Model => Model.IsActive, true)

@Html.RadioButtonFor(Model => Model.IsActive, false)
How to create RadioButton in ASP.NET MVC ?