This article shows how to use a RadioButtonFor helper in MVC applications.
Introduction
Create an ASP.Net Web Application as in Figure 1.
Figure 1: Web Application
Choose MVC template as in Figure 2.
Figure 2: MVC template
Add an Employee Controller as in Figures 3, 4 and 5.
Figure 3: Add Controller
Figure 4: MVC controller - empty
Figure 5: EmployeeController
EmployeeController.cs
Figure 6: Add ADO.NET Entity Framework
Employee.cs
Set up Entity Framework as in Figures 7 and 8.
Figure 7: Add ADO.NET Entity Framework
Figure 8: Connection Setting
Add the View as in Figures 9 and 10.
Figure 9: Add View
Figure 10: Index view
Index.cshtml
Figure 11: Index
Summary
In this article we saw how to use a RadioButtonFor helper in MVC applications.Happy coding!
ASP.NET GridView Control Pocket Guide