Telerik blogs

Starting from the Q3 '08 release, the jQuery library is an integral part of RadControls for ASP.NET AJAX. We've posted instructions on how to use the included version in your code and how to enable IntelliSense.

The bad news is that the instructions for enabling IntelliSense no longer work with the Q1 '09 version. The reason is that Visual Studio 2008 has a problem with parsing the jQuery library from version 1.3 and up. This required us to come up with a new way to enable IntelliSense. The good news is that the new approach is much cleaner and doesn't require external files at all.

To include jQuery on your page and enable IntelliSense you need to grab the latest internal build (version 2009.1.331 and up) and add these script references:

<asp:ScriptManager runat="server" ID="ScriptManager1">
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            jQueryInclude.js will replace jQuery (the global $ variable)
            with the version embedded in Telerik RadControls!
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />

What we did was to add the Visual Studio documentation (jQuery-vsdoc.js) in the assembly. Visual Studio now happily ignores the original script file and uses the -vsdoc version to generate the IntelliSense hints. This means less work for you too, as there's no need to download the help file separately.

Note: IntelliSense will not work if RadScriptManager is used instead of ScriptManager. For all intents and purposes, the reference to the later seems to be hard coded in Visual Studio. We'll let you know if we find a workaround, but for the moment you'll have to use ScriptManager while writing your JavaScript code and replace it with RadScriptManager later on.

UPDATE: You'll need this hotfix for IntelliSense to work: KB958502-JScript Editor support for “-vsdoc.js” IntelliSense documentation files.

About the Author

Iana Tsolova

is Product Manager at Telerik’s DevTools division. She joined the company back in the beginning of 2008 as a Support Officer and has since occupied various positions at Telerik, including Senior Support Officer, Team Lead at one of the ASP.NET AJAX teams and Technical Support Director. Iana’s main interests are web development, reading articles related to geography, wild nature and latest renewable energy technologies.


Comments are disabled in preview mode.