Html.BeginForm css properties without action and controller

triggerhappy187

New Member
I have 2 actions in my controller, Create and Edit, that essentially uses the same view, as the function of adding and editing a record is the same.So in my view, I have this:\[code\]@using (Html.BeginForm("Create", "Customers", FormMethod.Post, new { @class = "form-horizontal" }))\[/code\]I could just use \[code\]@using (Html.BeginForm()) { }\[/code\]But that way, I don't see any overload method to add in my css class filesHow do I use the same BeginForm helper for both my Create and Edit actions without having to hard code it?Or what other ways, or best practices should be employed if I want to set a style to my form tag, which will be used for 2 different actions.
 
Back
Top