Actually i am using server side validation and saw article that only adding link to java script file and using <%Html.ClientValidationEnabled = true%> will automatically enable client side validation but first of all i am using Visual Web Developer 2010 Express 4.0.30319
and here it show error that <%Html.ClientValidationEnabled = true%> does not exist i dont know
what reference i need for enabling this. Second i try to use
<% Html.EnableClientValidation(); %> it is not giving any error but also not working my page is posting back and only server side validations are working.
views:
31answers:
2
A:
Try following Scott Gu's excellent blog post about Model Validation and you should get it working.
Darin Dimitrov
2010-09-09 07:09:13
A:
Isn't it
<% Html.EnableClientValidation(); %> <% using (Html.BeginForm()) { %> ...Form fields go in here <% } %>
and you need script references for MicrosoftAjax.js and MicrosoftMvcValidation.js
Simon Hazelton
2010-09-09 08:02:11