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

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -