Add Custom JavaScript Intellisense

by JoeStagner 5/12/2008 10:43:32 AM

If you reference an ASP.NET page that contains a scriptmanager in your js file like below you get intellisense for the entire Microsoft AJAX Library plus any additional scripts ref’d by the scriptmanager.  The easiest way to get the /// <reference/> entry in your js file is to drag n drop your .aspx page from solution explorer into  the contents of your js file.  VS magically adds the refJ

Since I tend to use stand-alone .js files I can just add this.

/// <reference name="MicrosoftAjax.debug.js" />

to my consuming page and intellisense is wired to my JavaScript code.

image001

Thanks to Marc Schweigert for the reminder !

Currently rated 4.4 by 8 people

  • Currently 4.375/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

AJAX | ASP.NET | Joe Stagner [Syndicated]

Related posts

Comments

5/12/2008 12:24:56 PM

One note though... If you add references in your embedded javascripts, these are not followed as they are with local javascript files. So you would have to reference ALL you embedded javascript files from your local file, and can't just reference the "top-most" embedded file in the hiarchi.
Hopefully they will fix that in SP1 (at least the guy who designed this knows about it this limitation)

Morten us

Powered by BlogEngine.NET 1.3.0.0
Theme by Mads Kristensen

About your host.

Name of author Joe Stagner
?????

E-mail me Send mail

Calendar

<<  July 2008  >>
MoTuWeThFrSaSu
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910

View posts in large calendar

Pages

Recent comments

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008

Sign in