Summary


One of the most common tasks encountered in building Web applications is retrieving data from a data source and rendering that data to the client browser. ASP.NET provides an architecture for binding data to controls that greatly simplifies and modularizes this task. Instead of manually walking through result sets, you can initialize the data source, point one or more server-side controls to it, and ask them to bind themselves to the data. The source of data can be most any collection, whether it is a result set from a database query or a programmatically populated ArrayList . The controls are equally diverse, beginning with simple list controls such as SELECT elements and ListBox es, and going all the way up to the more complex data-bound controls such as the DataGrid , DataList , and Repeater .

Templates give you even more control over the data binding process by letting you specify exactly how each row of the data source should be rendered in the context of the data-bound control. For the DataGrid , this means that you can provide a shell, or template, of HTML sprinkled with data binding syntax to indicate where the data should be inserted for each column in the rendered grid. The DataList gives you a similar tabular layout with precise control over each cell rendered in the table, and the Repeater gives you complete control over how the data should be rendered, without even generating the containing table for you.



Essential ASP.NET with Examples in Visual Basic .NET
Essential ASP.NET with Examples in Visual Basic .NET
ISBN: 0201760398
EAN: 2147483647
Year: 2003
Pages: 94
Authors: Fritz Onion

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