Tuesday 11 September 2012

Form Tag in Mvc3 Razor


Form tag in Asp.net mvc3 Razor
 @using (Html.BeginForm("About","Home", FormMethod.Post, new { @class = "form with-margin", @name = "login-form", @id = "login-form" }))
 {

  //Code here

 }

Render like

<form name="login-form" method="post" id="login-form" class="form with-margin" action="/Home/About">

</form> 

No comments:

Post a Comment