• Home
  • Privacy Policy
  • Terms & Conditions
  • Contact
  • Advertise
Videos, Photos, Wallpapers, Free Download, Movies, Songs, Sports , Live TV, Entertainment
 
  • Home
  • Bollywood
  • Hollywood
  • Box Office
  • Beauty
  • Fashion
  • Celebrity
  • Business
    • Social Media
    • Money Online
    • Category
  • Entertainment
    • Bollywood
  • Video
    • Youtube
    • Video
  • Technology
    • Asp.net
    • C#
    • SQL
    • .Net
Showing posts with label DataBound controls. Show all posts
You can bind a DataBound control to a DataSource control. A DataSource control is used to represent a particular type of data.

The ASP.NET 3.5 Framework includes the following six DataSource controls:
  • SqlDataSource : Represents data retrieved from a SQL relational database, including Microsoft SQL Server, Oracle, or DB2.
  • LinqDataSource : Represents a LINQ to SQL query.
  • AccessDataSource : Represents data retrieved from a Microsoft Access database.
  • ObjectDataSource : Represents data retrieved from a business object.
  • XmlDataSource : Represents data retrieved from an XML document.
  • SiteMapDataSource : Represents data retrieved from a Site Map Provider. A Site Map Provider represents the page and folder structure of a website.
The ASP.NET Framework contains two basic types of DataSource controls. The SqlDataSource, AccessDataSource, LinqDataSource, and ObjectDataSource controls all derive from the base DataSourceControl class. These controls can be used to represent tabular data. The XmlDataSource and SiteMapDataSource controls, on the other hand, derive from the base HierarchicalDataSourceControl control. These two controls can be used to represent both tabular and hierarchical data.
A DataBound control is associated with a particular data source control through its DataSourceID property.
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 the contents of an XML file, or a set of master/detail database records.

Hierarchical DataBound controls:
  • Menu : Displays data items in a static or dynamic menu.
  • TreeView : Displays data items in a tree.
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 six 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.

Following controls to display a set of data items:
  • 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.
  • ListView : Displays a set of data items using a template. Unlike the Repeater control, the ListView control supports sorting, paging, and editing database data.
Following two controls to display a single data item at a time:
  • 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 layout a form by using templates.
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.
  • 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.
All five controls inherit from the same base ListControl class. This means that all these controls share a core set of properties and methods.
Older Posts Home

ASP.NET Examples

 
2012 24x7 Magazine. All rights reserved.
Designed by 24x7 Magazine