You use DataBound controls to generate your application's user interface for working with data. The DataBound controls can be used to display and edit database data, XML data, or just about any other type of data you can imagine.
There are three main types of DataBound controls: list controls, tabular DataBound controls, and hierarchical DataBound controls.
List Controls
List controls are used to display simple option lists. The ASP.NET 2.0 Framework includes the following five list controls:
-
BulletedList Displays a bulleted list of items. Each item can be displayed as text, a link button, or a hyperlink
CheckBoxList Displays a list of check boxes. Multiple check boxes in the list can be selected.
DropDownList Displays a drop-down list. Only one item in the drop-down list can be selected.
ListBox Displays a list box. You can configure this control so that only one item in the list can be selected or multiple items can be selected.
RadioButtonList Displays a list of radio buttons. Only one radio button can be selected.
Tabular DataBound Controls
The tabular DataBound controls are the main set of controls that you use when working with database data. These controls enable you to display and, in some cases, modify data retrieved from a database or other type of data source.
There are five tabular DataBound controls. These controls can be divided into two types: those that display multiple data items at a time and those that display a single data item at a time.
For display multiple data items at a time are :
GridView Displays a set of data items in an HTML table. For example, you can use the GridView control to display all the records contained in the Movies database table. This control enables you to display, sort, page, select, and edit data.
DataList Displays a set of data items in an HTML table. Unlike the GridView control, more than one data item can be displayed in a single row.
Repeater Displays a set of data items using a template. Unlike the GridView and DataList controls, a Repeater control does not automatically render an HTML table.
DetailsView Displays a single data item in an HTML table. For example, you can use the DetailsView control to display a single record from the Movies database table. This control enables you to display, page, edit, and add data.
FormView Uses a template to display a single data item. Unlike the DetailsView, a FormView enables you to use to layout a form by using templates.
Hierarchical DataBound Controls
A hierarchical DataBound control can be used to display nested data items. For example, you can use hierarchical DataBound controls to display the folder and page structure of your website, the contents of an XML file, or a set of master/detail database records.
The ASP.NET 2.0 Framework includes two hierarchical DataBound controls:
Menu Displays data items in a static or dynamic menu.
TReeView Displays data items in a tree.
No comments:
Post a Comment