Part II: Assigning Actions to the Data Web Controls

In Part I we examined the basics of the data Web controls. Specifically, we began with a high-level introduction to the data Web controls, followed by a thorough examination of binding data to these controls. Part I concluded with an examination of how to customize the HTML output of the data Web controls to achieve a more aesthetically pleasing result.

Part I showed how the data Web controls could be used to easily and quickly display structured data. Although the data Web controls do an outstanding job displaying data, they are capable of much more, as we will see in the remainder of this book!

In Part II, we will look at how to associate actions with a data Web control. In Chapter 4, "Adding Buttons and HyperLinks to the DataGrid Web Control," we'll look at how to add Button and HyperLink columns two Column types mentioned in the first chapter to the DataGrid. The generic Button column is useful for associating some kind of action with each row in a DataGrid. The HyperLink column can be used to provide a simple data-bound hyperlink for each row. For example, you could use a DataGrid to display a list of products your company sells, with each row in the DataGrid having a link that takes the user to a "Details" page featuring extensive information about a particular product.

In Chapter 5, "Adding Command Buttons to the Data Web Controls," we'll cover how to create special types of controls in templates that trigger a specific event when clicked. With these controls you can provide, among other things, simple update and delete capabilities. Specifically, we'll examine how to provide such functionality in a DataList control.

In Chapter 6, "Using External Web Controls to Achieve Effects on the Web Control," we'll examine how Web controls not directly associated with the data Web control have an effect on the data Web control. For example, you might have a DataList that displays all of your company's products, but you would like to allow the user to filter the results so that she only sees products of a certain category. To accomplish this, you can present the user with a RadioButtonList containing one radio button for each product category. When the user selects a specific category from the list, the page is posted back and the DataList only shows those products that have the specified category.

By the end of Part II you should be comfortable associating simple actions with the data Web controls. This understanding is essential for Part III, in which we'll examine a number of the advanced features of the DataGrid control, including sorting, paging, and editing.



ASP. NET Data Web Controls Kick Start
ASP.NET Data Web Controls Kick Start
ISBN: 0672325012
EAN: 2147483647
Year: 2002
Pages: 111

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net