Answer the question
In order to leave comments, you need to log in
How to add CSS class to html form in ASP.NET MVC 4?
There is a standard login form:
@using (Html.BeginForm(new { ReturnUrl = ViewBag.ReturnUrl }))
{
<!-- some -->
}
@using (Html.BeginForm(new { ReturnUrl = ViewBag.ReturnUrl, @class = "myclass" }))
<form action="/Account/Login?ReturnUrl=%2F&class=myclass" method="post">
public ActionResult Login(string returnUrl)
{
ViewBag.ReturnUrl = returnUrl;
return View();
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question