Smart tags and smart tasks (the terms can essentially be used interchangeably) are menu or IntelliSense-driven features for automating common control configuration and coding tasks within the IDE. Designers and editors both implement smart tags in various scenarios.

HTML Designer
As controls are placed onto the HTML designer, a pop-up list of common tasks appears. These tasks, collectively referred to as smart tasks, allow you to “set the dials” for a given control to quickly configure it for the task at hand.

You use the common tasks list to quickly configure a control’s properties, as well as walkthrough common operations you might perform with it. For example, when you add a GridView control to a web page, a common task list appears that allows you to quickly enable sorting, paging, or editing for the GridView. When you add a TextBox control to a web page, a common task list appears that enables you to quickly associate a validation control with the control.

The Windows Forms designer also plays host to smart tags.

Windows Forms Designer
With the Windows Forms designer, the functionality of smart tags remains consistent; they do, however, take a slightly different form. A form control that supports this functionality shows a smart tag glyph somewhere within its bounds (typically to the top right of the control). This glyph, when clicked, opens a small drop-down of tasks.

Code Editor
Smart tags can also appear within code. One example can be found on interfaces. Normally, implementing an interface is a fairly code-intensive task. You have to individually create a member to map to each member defined on the interface. The smart tag in this case allows you to automatically create those members using two different naming modes:

• Explicit naming—Members have the name of the derived interface.

• Implicit naming—Member names do not reference the name of the derived interface.

Source of Information : Sams Microsoft Visual Studio 2008 Unleashed


Subscribe to Developer Techno ?
Enter your email address:

Delivered by FeedBurner