Are there any samples of doing remote[?] server-side form validation in ASP.net MVC without javascript or jQuery. The validation needs to work after form is posted?
2 Answers
Here's an old blog post from Scott Gu, maybe it will help get you started: http://weblogs.asp.net/scottgu/archive/2008/09/02/asp-net-mvc-preview-5-and-form-posting-scenarios.aspx
Comments
Why you would do this without jQuery is beyond me considering in mvc 3, even the ajax stuff happens with jQuery behind the scenes. Im assuming when you say remote validation you mean client validation but calling to the server.
In that case you will have to construct a call to your url to validate the parameter - using 'some' client javascript library or plain xmlhttprequest calls. but frankly.. to do this without jQuery when the path of mvc clearly includes jQuery, isn't going to be the best design decision IMHO : )