In this article i will discuss how to add jQuery intellisense in Visual Studio 2008. I will discuss
To see whether you have already installed version of Visual Studio 2008 Service Pack 1.Open Visual studio. Go to Help>>About Microsoft Visual Studio
The About Microsoft Visual Studio window will open.
Notice that there should be Version…..SP. That is SP denotes that service pack is installed on your machine.If visual studio service pack is not installed then your first step is to install it. Step2:Download and install VS2008 SP1 Hotfix to Support "-vsdoc.js" IntelliSense Doc Files You can get information regarding hot fix in detail on below linkshttp://blogs.msdn.com/webdevtools/archive/2008/11/07/hotfix-to-enable-vsdoc-js-intellisense-doc-files-is-now-available.aspxhttp://code.msdn.microsoft.com/KB958502/Release/ProjectReleases.aspx?ReleaseId=1736
Step3:Download the jQuery-vsdoc.js fileGo to http://docs.jquery.com/Downloading_jQuery#Download_jQueryYou will find different releases of jQuery .I am showing you an example of jQuery 1.3.2 release.
Click Visual Studio link in front of Documentation tag. You will be redirected to next page.In next page you can found the link for downloading jQuery-vsdoc.js file
Note the file name is jQuery-VersionNumber-vsdoc2.js.After downloading that rename it to jQuery-VersionNumber-vsdoc.js. You would have noticed that I have removed 2 from the vsdoc2 in the end. Now there are two scenarios’ you might be working with • jQuery-VersionNumber.js (for example jquery-1.3.2.js)• jQuery-VersionNumber.min.js (for example jquery-1.3.2.min.js)I will explain how to deal with both scenariosI have taken a scripts name folder in my root directory.
In first case jQuery-VersionNumber.js (for example jquery-1.3.2.js)Now my jQuery script file is jquery-1.3.2.js.And I have renamed that vs doc file as jQuery-VersionNumber-vsdoc.js ie I have named that file as jquery-1.3.2-vsdoc.js In second scenario jQuery-VersionNumber.js (for example jquery-1.3.2.min.js)Now my jQuery script file is jquery-1.3.2.min.js.And I have renamed that vs doc file to jQuery-VersionNumber.min-vsdoc.js i.e. I have renamed that file as jquery-1.3.2.min-vsdoc.js
I have added an .aspx page Default.aspx in the root directory.Got to Source view of Default.aspx page Add reference of jquery script file to Default.aspx page
Now press CTRL+ SHIFT+J to update the Jscript intellisense or Go to Edit>>IntelliSense>>Update Jscript Intellisense
You will see Update JScript Intellisense message.
And that’s it you are done.:)Now you can test that your jQuery intellisense has started working.
Now press CTRL+ SHIFT+J to update the Jscript intellisense or Go to Edit>>IntelliSense>>Update Jscript IntellisenseAnd that’s it you are done.:) You can check in My.js for jQuery intellisense.How to add jQuery Intellisense in UserControl
I have added one folder with name usercontrols and also added on usercontrol with name TestUserControl.ascx. Add the below code at the top of the TestUserControl.ascx page
Now press CTRL+ SHIFT+J to update the Jscript intellisense or Go to Edit>>IntelliSense>>Update Jscript IntellisenseAnd that’s it you are done.:)
http://blogs.msdn.com/webdevtools/archive/2008/10/28/rich-intellisense-for-jquery.aspxhttp://weblogs.asp.net/scottgu/archive/2008/09/28/jquery-and-microsoft.aspxhttp://weblogs.asp.net/scottgu/archive/2008/11/21/jquery-intellisense-in-vs-2008.aspxhttp://blogs.msdn.com/webdevtools/archive/2008/11/18/jscript-intellisense-faq.aspxhttp://www.west-wind.com/Weblog/posts/536756.aspxHappy Reading !
What kind of email newsletter would you prefer to receive from CodeAsp.Net?