Adding a Class Attribute via Html.BeginForm - ASP.NET MVC

,

We can specify the css class attribute in an HTML helper method BeginForm as below in ASP.NET MVC Application

Html.BeginForm("MyActionName", "MyControllerName", FormMethod.Post, new { @class = "myclass"})