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
Post a Comment