How to pass query parameter and class attribute to Html.BeginForm in MVC?

@using (Html.BeginForm(“action”, “controller”, new { ReturnUrl=”myurl” }, FormMethod.Post, new { @class = “auth-form” })) { … }

@using (Html.BeginForm(“ActionName”, “ControllerName”, new { Id = Model.Id }, FormMethod.Post, new { enctype = “multipart/form-data” }))

 

Source: https://stackoverflow.com/questions/9991991/how-to-pass-query-parameter-and-class-attribute-to-html-beginform-in-mvc3

 

Posted in: MVC

Leave a comment