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 7194277
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:20:21+00:00 2026-05-28T20:20:21+00:00

I have a razor cshtml view that uses jquery. I get following error during

  • 0

I have a razor cshtml view that uses jquery. I get following error during certain user action.

Microsoft JScript runtime error: Unable to get value of the property
‘unobtrusiveValidationAttributes’: object is null or undefined

When error happen, debugger breaks at
MVCx.GetEditorByElement(b).unobtrusiveValidationAttributes[c+ this]});
from following line of code

 function(b,i){var d=a(b),f=d.parents("form")[0],c,e,g;if(!f)return;c=a(f).data("unobtrusiveValidation");c.options.rules[b.name]=e={};c.options.messages[b.name]=g={};a.each(this.adapters,function(){var c="data-val-"+this.name,i=MVCx.GetEditorByElement(b).unobtrusiveValidationAttributes[c],h={};if(i!==undefined){c+="-";a.each(this.params,function(){h[this]=MVCx.GetEditorByElement(b).unobtrusiveValidationAttributes[c + this]});this.adapt({element:b,form:f,message:i,params:h,rules:e,messages:g})}});jQuery.extend(e,{__dummy__:true});!i&&c.attachValidation()}

My theory is that error is caused because I may not have referece to certain JQuery file (missing some <script src="@Url.Content("~/ApplicationScripts/JQuery/jquery-1.4.4.min.js")" type="text/javascript"></script>.

Assuming its casued by missing jquery reference, one way of solving it is by adding all jquery references (obviously tedious). I wonder if there is better way of finding which jquery reference is actually needed.

UPDATE
This is how my references are setup right now

<script src="@Url.Content("~/ApplicationScripts/JQuery/jquery-1.4.4.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/ApplicationScripts/JQuery/jquery.unobtrusive-ajax.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/ApplicationScripts/JQuery/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/ApplicationScripts/JQuery/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
  • 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-28T20:20:21+00:00Added an answer on May 28, 2026 at 8:20 pm

    ASP.NET MVC 3 comes with jquery-1.5.1.js. You seem to be using jquery-1.4.4.min.js. I am not sure that the jquery.validate plugin and the other unobtrusive scripts are compatible with this version of jQuery. Try using the default scripts that are provided when creating a new application.

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

Sidebar

Related Questions

I have a cshtml partial view (Razor engine) that is used to render something
I have a .csHtml -razor file with a javascript function that uses the @Url.Content
I have a Razor view that has something like this in: @foreach (var item
I have one (razor) page that contain 5 different partial views. Each partial view
I have the following action method that returns a collection of AdminDetail instances: public
Have you managed to get Aptana Studio debugging to work? I tried following this,
Giving a little background info: Details.cshtml contains a title (uses model Category), I have
I am using ASP.NET MVC 3 with the Razor view engine . I have
I have a console app with a razor view in it. I have included
How can i directly access a .cshtml file in ASP.NET MVC using razor view

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.