Figure 4. Configure Web Page DataSources and Controls With Smart Tasks.
ASP.NET 2.0's new DataSource placeholders and data-bound server controls, such as the GridView, add Smart Task tags to support declarative design actions. For example, the SqlDataSource1 placeholder's Smart Task tag has a Configure Data Source link to start the Data Source Configuration Wizard. The GridView's Smart Task tag provides shortcuts to open the Auto Format dialog, select and configure the data source, manipulate columns, and edit the Empty Data and Paging templates. Checkboxes enable codeless paging, toggled bidirectional column sorting, row editing, deletion, and selection. You can duplicate most Smart Tasks by setting property values in the DataSource placeholder, in a control's Properties window, or in a control's Source window. Or, you can add event-handling code to the page's code-behind file.