asp.net mvc 2 - Disable form validation in MVC2 -


is possible programatically disable form validation in mvc2?

i'm hoping there kind of command can put in custom actionmethodselectorattribute, making possible prefix actionresults want form validation disabled.

the reason have form multiple buttons, 1 button adds new row child object of model - consequently creates new row on form.

this works fine, validation fired form each time "add" pressed, , new fields flag validation errors before user has chance enter data.

i've found alternative solution this.

rather use multiple form buttons, i've used custom html helper produces "add" link. helper places current model in tempdata , produces link add/{id}.

i'm not sure cleanest solution, allows child elements added without validation firing. tidy things bit, specified form such:

html.beginform(view, controller, new { id = model.id })


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -