1

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?

1
  • You have an expample in default mvc website from Visual Studio. You post the form to a validation ActionResult and then redirects to authenticated page. Commented Apr 9, 2011 at 9:17

2 Answers 2

0

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

Sign up to request clarification or add additional context in comments.

Comments

0

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 : )

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.