c# - MVC: using BeginForm inside a custom HtmlHelper -


i have following code in mvc view:

<% using (html.beginform()) { %>   <input type="text" name="id"/>   ...   ... <% } %> 

i want refactor reused. want move code custom htmlhelper.

how use html.beginform in helper?

thanks in advanced.

why not refactor shared, partial view instead? easier creating helper method in code, in opinion.


Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -