Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have an MVC form which needs to validate well with javaqscript disabled on the browser as well. I am unable to get it working . Has anyone had a scenario like this?
Any help much appreciated.
You can attribute your request model with some data annotations. Then the validation will also happen server side when you call
in your controller action that handles your post request
Here is some more information : http://www.asp.net/mvc/overview/older-versions/mvc-music-store/mvc-music-store-part-6
Do you already use DataAnnotations Attributes? If so it should work without scripting enabled.
Yes, I had Model.IsValid() and Data Annotations as well. Even then it was not firing. I was rendering my form partial as Html.Partial() as opposed to Html. Action() . I changed that and the server side validations started kicking in. When using Html.Partial() it was validating the model using Model.IsValid() but the validationsummary was not showing up at all.
Glad to hear you go it solved. Don't forget to mark this post as a solution so others can find it as well
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted