Exam 70-553 - Implement data-bound controls.

 Section 2

  • Part 2
    Integrating Data in a Web Application by Using ADO.NET, XML, and Data-Bound Controls
    • Topic 1

 

Implement data-bound controls.

  • Use tabular data source controls to return tabular data.
  • Use hierarchical data source controls to display hierarchical data.
  • Display data by using simple data-bound controls.
  • Display data by using composite data-bound controls.
  • Display data by using hierarchical data-bound controls.
  • Use the FormView control to display the values of a single table record from a data source.

Summary

Tabular Data Source Controls are meant to connect data ready components to data sources that represent data in tables. Tabular Data Source Controls include:

AccessDataSource - Represents a connection to an access database
DataSetDataSource - Works with the Xml Representation of a Data Source
ObjectDataSource - Allows binding to a custom Object
SqlDataSource - Represents a connection to a SQL server

Hierarchical data source controls are meant to connect data ready components to data sources that represent xml like data where nodes can nest as much as necessary. Hierarchical data source controls include:

SiteMapDataSource - Gets Data from an ASP.Net SiteMap

XmlDataSource - Loads data from an Xml File, Url, or string (Can be used to bind to results of Web Service that supports get through the Url Property)

The List of Data Controls comes from the ASP.Net 2.0 Quickstart link in the resources.

GridView - Renders data in a grid format. This control is an evolution of the DataGrid control, and can automatically take advantage of data source capabilities.

DetailsView - Renders a single data item in a table of label/value pairs, similar to the form view in Microsoft™ Access. This control can also automatically take advantage of data source capabilities.

FormView - Renders a single data item at a time in a form defined by a custom template. Renders a single data item in a table of label/value pairs, similar to the form view in Microsoft™ Access. This control can also automatically take advantage of data source capabilities.

TreeView - Renders data in a hierarchical tree view of expandable nodes.

Menu - Renders data in a hierarchical dynamic menu (including flyouts).

The FormView supports automatic Updates, Inserts, and Deletes through its associated data source control just like the DetailsView control. To define the input UI for editing or inserting, you define an EditItemTemplate or InsertItemTemplate in addition to the ItemTemplate. In this template you will data bind input controls such as TextBox, CheckBox, or DropDownList to the fields of the data source. Data bindings in these templates use a "two-way" data binding syntax, however, to allow the FormView to extract the values of input controls from the template in order to pass to the data source. These data bindings use the new Bind(fieldname) syntax instead of Eval.

Other Resources & Links:

More Load, Less Code with the Data Enhancements of ASP.NET 2.0
http://msdn.microsoft.com/msdnmag/issues/04/06/ASPNET20Data/default.aspx

Data Source Controls in ASP.Net 2.0
http://msdn.microsoft.com/msdnmag/issues/05/01/DataPoints/

Data Controls (ASP.Net 2.0 Quickstart)
http://www.asp.net/QuickStart/aspnet/doc/ctrlref/data/default.aspx


Exam 70-553 - Manage connections and transactions of databases.

Exam 70-553 - Program a Web application.