We now (automatically) support HTML editor based
intellisense for any control or user-control used within the project. For
example, the below screen-shot shows the intellisense I get when consuming an
.ascx user-control on a page that has a custom “Foo” property:
The new web project system will dynamically compile and use
reflection to figure out what properties are exposed on the user-control.
Custom compiled controls no longer need to jump through
schema registration hoops to get intellisense either. Simply register the
control using a standard <%@ Register %> directive at the top of the
page, and VS will also use reflection to provide intellisense within the html
editor. (note: this was a real pain with VS 2003).
At the bottom of an html or asp.net source-view document is
a new control called the “tag-navigator”. It updates as you move around a
document, and always shows the complete parent chain of html tags from the root
<html> element to the location where the cursor currently is. If any of
these tags has an ID value, it will also include that value as well (for
This makes it much easier to figure out “where am I in a
document”, and figure out the nesting relationships of elements quickly (“am I
in this div/table or a deeper nested one?”). This can be super-useful with
large html documents.
For example: here is a screenshot of what it looks like when
I copy/pasted in some html from the my.yahoo.com website (which has a lot of html):
What is then cool is that when you click on any of the
elements in the navigator it will highlight them (and optionally allow you to highlight
the inner contents).
Container elements in HTML are now collapsible (and expandable)
using +/- gestures in the left hand side of the editor. For example, the
GridView in the below screen-shot is collapsed to hide all of its inner
Note that you can have multiple levels of collapsing – so
you could expand the above GridView to see more of its contents, but still have
one of its templates inside collapsed. Makes dealing with lots of content much
HTML Tag Bolding
If you click on (or navigate onto) any element within the
html editor, we will now bold both it and its end tag:
This also makes it much easier to navigate around deeply
nested HTML documents and figure out where elements start and end.
Per Tag Formatting Rules
You can now specify and control precisely how your HTML will
look when you add it to a page. You can set both the defaults for
capitalization rules, indentations, whitespace, etc for elements:
As well as customize default formatting settings on a
per-element or control basis:
This will control what the html source will look like when
you add it in the designer (for example: drag/drop from a toolbox).
You can also then within the html source editor select any
HTML you want, right-click, and choose to “Format Selection”. This will modify
the selected HTML to follow your coding guideline rules (very useful when you
are given ugly HTML to use).
Per HTML Element/Control Colorization
Someone in the Beta1 timeframe told us that he absolutely
loved the new HTML editor capabilities, and that the only feature he was
missing that would prevent him from switching from HomeSite was the ability to
perform per-tag colorization in the source editor.
Whoever you are out there – we hope you are happy now (it is
supported in the final release, complete with a 32-bit color palate to choose