How to add class attribute for following situation (Using ReturnUrl only):
@using (Html.BeginForm(new { ReturnUrl = ViewBag.ReturnUrl }))
{
}
I want something like this:
@using (Html.BeginForm(new { ReturnUrl = ViewBag.ReturnUrl }, new { @class = "login-form" }))
{
}
There is an overload for that, if you supply the controller action, name, and form method.
@using (Html.BeginForm("ActionName", "ControllerName",
new { ReturnUrl = ViewBag.ReturnUrl },
FormMethod.Post, new { @class="login-form" }))
{
etc.
}