Jquery – Microsoft JScript runtime error: Unable to set value of the property ‘control’: object is null or undefined


I am Developing a web application by using ASP.NET 3.5, jQuery and RadAjax Telerik Control. I get Error Messages when page Loading. that is :"Microsoft JScript runtime error: Unable to set value of the property 'control': object is null or undefined" . Image:enter image description here

and when I click to Open RadWindow then get same Error Message. and could not open radwindow.

Image 2:enter image description here

How can I solved this Error. Help me..


Best Solution

This issue is isolated to the jQuery Validate Javascript Library.

The script filename is: jquery.validate.unobtrusive.min.js

Although jQuery is Open Source, this library was provided by Microsoft (as indicated at the top of my js file):

** Unobtrusive validation support library for jQuery and jQuery Validate
** Copyright (C) Microsoft Corporation. All rights reserved.

Try replacing the library to use the replacement jquery.validate.min.js

One way is to use Visual Studio's NuGet Package Manager by the following:

  1. Right-click on your Project's References folder
  2. Select 'Add Library Package Reference...'
  3. When the window opens, Select 'Online' from the left sidebar menu.
  4. On the top-right, type in 'jquery.validate' and hit the enter key.
  5. Locate the 'jQuery Validation' and click the 'Install' button.
  6. Change your code to use the new library name 'jquery.validate.min.js'

I tested this and my client-side field validation all seems to work without the annoying exceptions when debugging in Visual Studio.