asp.net mvc - Is there a way for Ajax.BeginForm return JSON and automatically update Form -


what want use dataannotation identify validation on model view. want able call action ajax.beginform or other feature, , action returns json automatically update form.

i have written code submit form's data using jquery feature $.ajax server. action returns model view includes errors , other info converted json. on client had write custom javascript display errors , such. seems overly convoluted. seems there should better way of doing this. missing something

is aware of better way of doing this, or know of resource can point me in correct direction?

bardev

no, not missing anything. if return json need handle on client manually in order update gui. easier solution return partial view containing form html containing validation errors.


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? -