Table of Contents
- Intellisense Support
- Intellisense Hints and Comments
- Useful Links
An inclusion of keywords in Intellisense, for example:
Since we are on the topic of efficiency, another neat feature introduced by Visual Studio 2008 is the transparency of the Intellisense window. Simply click the Control (Ctrl) key while the window is displayed, and you can see the code underneath it.
public methods and properties to the page you are including it in. For example:
Include YAHOO animation library file in your page:
And immediately you get the following in your Intellisense window:
/// <reference path="yui/build/yahoo-dom-event/yahoo-dom-event.js" />
/// <reference path="yui/build/animation/animation.js" />
The last new feature we'll look at is the Intellisense hints. You can add hints to your code in the following manner:
function SayHello(firstName, lastName)
return "Hello " + firstName + " " + lastName;
Notice, that the comments block is within the function block, not directly above it, as it would be in VB.NET or C#.
By using the above code, you get the following in your ASPX file:
And then the parameter details will also display your comments:
Notice, that, in the above example, type attributes are specified as
string. These are provided for informational purposes only, but you may find them useful when coding.
At the time of this writing, Intellisense hints and comments were only available from includes, not from the code block within your current page. That means, that the above example will display comments and hints only when you place it in an include file, and then reference it in your ASP.NET page. If, however, you place this code in the same ASP.NET page's script block, the comments and hints will not be shown. It will be interesting to see, where Microsoft takes this feature in the final release.
- 4th November, 2007: Initial post