asp.net - Mvc add id and css class in MVC Html.BeginForm() -


i new mvc.

how can add id , css class in mvc html.beginform().

this html form.

<form id="frmid" class="frmstyle">     ... </form> 

i tried got error.

@html.beginform("actionname", "controllername", new {id="frmid", class = "frmstyle"}) 

we add part of htmlattributes.

@html.beginform("actionname", "controllername", formmethod.post,  new {id="frmid", @class = "frmstyle"}) 

Comments

Popular posts from this blog

javascript - How to name a jQuery function to make a browser's back button work? -

collision detection - C++ library for mesh to mesh intersection: what is available? -

python - Django-easy-pdf: xhtml2pdf reporting reportlab 2.2+ is required, but 3.0 installed -