Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 696965
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T03:07:09+00:00 2026-05-14T03:07:09+00:00

I can’t seem to get client side validation working with the version of MVC

  • 0

I can’t seem to get client side validation working with the version of MVC released with Visual Studio 2010 RC.

I’ve tried it with two projects — one upgrade from 1.0, and one using the template that came with VS.

I’d think the template version would work, but it doesn’t. Added the following scripts:

<script type="text/javascript" 
  src="<%= Url.Content("~/Scripts/MicrosoftMvcValidation.js") %>">
</script>
<script type="text/javascript" 
  src="<%= Url.Content("~/Scripts/jquery.validate.js")%>">
</script>

which are downloaded to the client correctly. Added the following to my form page:

<% Html.EnableClientValidation(); %>
<%--yes, am aware of the EndForm() bug! --%>
<% using (Html.BeginForm()) { %>    
<%--snip --%>

and I can see the client validation scripts have been added to the bottom of the form. But still client validation never happens.

What is worse is that in my upgraded project, the client validation scripts are never output in the page!

PLEASE NOTE: I am specifically asking about the version of MVC2 that came with VS2010 RC. Also, I do know how to google; please don’t waste anybody’s time searching and answering if you aren’t familiar with this issue in the release candidate of Visual Studio. Thanks.


Error ID10T: User editing one page and testing another.

However, I can’t get client-side validation working on the MVC2 template project. If anybody has an idea how to, say, get it working for the registration page, please answer.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T03:07:10+00:00Added an answer on May 14, 2026 at 3:07 am

    I had the same problem also,
    the examples by MS(scottGu and haacked) are a bit confusing since you don’t really know on which version they are talking about, and haacked updates his post every time a new version is out so you it’s not relevant to you :(.

    To make jQuery validation work On VS 2010 do the following:

    1. as you answered you need the MicrosoftMvcJQueryValidation.js file, several ways to get this file, i got it from the example project from haacked post: ASP.NET MVC 2 Custom Validation
    2. remove all JS references and leave just this one and the jquery.validate.min.js
    3. call <% Html.EnableClientValidation(); %> before the opening tag of the form
    4. Dont forget to put some Html.ValidationMessageFor(.. on your fields since this is the trigger for adding the enteries to the client validation JSON object

    i guess you did all the above, but left the references to MicrosoftMvcValidation.js on the page, notice at the end of this file there is the hook to the MS client side validation.

    funny i just wanted to blog about this issue this morning and found your question,\hope this helps

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can I change the field public virtual ClassOne ClassOne { get; set; } to
Can any one tell, how to get the result of LINQ query contains group
Can't seem to figure out what's wrong with the simple getJSON call below. It's
Can somebody give me advice on how to create a recursive version of GetEnumerator()?
Can i get the source code for a WAMP stack installer somewhere? Any help
Can find why i get this error can someone help? package Android.data; public class
Can I get a big picture for graph objects? Example: //take id,name,picture,description from pages,
Can anyone let me know how can we change the value of kendo combobox
Can I order my users in the database, so I don't have to say
Can I authenticate with just Google account username and password instead of using OAuth?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.