Tip #35: Did you know…How to add Intellisense from script libraries for JS files?

Posted: Dec 16, 2008  2 comments  

Average Rating

Tags
Ajax
ASP.NET
Deepak Verma
tips and tricks
Visual Studio
Visual Studio 2008
VS2008

Here is an example to add intellisense for JS files in VS 2008.

So, you have two Javascript files

Jscript1.js with the following code

function validateForm() {
}

and Jscript2.js (wherein you want current JScript file to show intellisense including objects & functions declared in Jscript1.js)

Now to add intellisense, from the solution explorer drag drop Jscript1.js into Jscript2.js.

You will notice that the following Jscript document comment has been added to the Jscript2.js file.

/// <reference path="JScript1.js" />

And now you can start using the intellisense, try typing in validateForm in Jscript2.js.

image

Thanks,
Deepak Verma
SDET | Visual Web Developer

View the original post

Submit a Comment

  • Plain text is accepted.
  • URLs starting with http:// are converted to links.