html - How to add "id" attribute in form element using MVC4 -
i tried add id attribute in form element using following code:
@using(html.beginform("<action>", "<controller>", new {id="search"}))
i got following code in source view:
<form action='/controller/action/search' method="post">
i need add "id" attribute. how that?
thanks in advance
try
@using(html.beginform("<action>", "<controller>",formmethod.post, new {id="search"}))
Comments
Post a Comment