Geeks With Blogs

News Microsoft MVP

Catch me on FaceBook too!



la familia
Title Of Blog

 

 

Continuing my short but sweet posts regarding issues I've encountered and corrected during development......

If you are working with the Telerik MVC suite of controls within your ASP.NET MVC application you may encounter a JavaScript error similar to "Object doesn't support this property or method".

The problem? Telerik controls make use of jQuery and by default will add a script registrar to your view which then automatically includes the core jQuery JavaScript files. Like many developers you may chose to include your own version of these files, say for use with open source jQuery plugins and widgets. When you include your own copy of the jQuery JS files a conflict occurs which leads to the error message. The fix is to tell the Telerik Script Registrar to not include it's own jQuery JS files as follows:

//Razor syntax

@Html.Telerik().ScriptRegistrar().jQuery(false)

If making use of layouts this should be placed in the layout file so it is included in all views.

Posted on Tuesday, July 12, 2011 10:04 AM ASP.NET , jQuery | Back to top


Comments on this post: jQuery with ASP.NET MVC and Telerik Controls

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Jake Rutherford | Powered by: GeeksWithBlogs.net