Databases overview
Microsoft Expression Web allows you to use ASP.NET controls to display data from a database in your .aspx files. You can include XML data, but not database data, in HTML files, so if you need to include database data display, row updating, row editing, or adding new rows to a database, use .aspx files and ASP.NET controls.
There are two types of ASP.NET controls that are involved in displaying database data on a web page: Data source controls and data-bound controls.
Data source controls
Data source controls are ASP.NET controls that manage the tasks of connecting to a data source and reading and writing data. Data source controls do not render any user interface, but instead act as an intermediary between a particular data store (such as a database or XML file) and other controls on the ASP.NET web page. Data source controls enable rich capabilities for retrieving and modifying data, including querying, sorting, paging, filtering, updating, deleting, and inserting. For more information on ASP.NET data source controls, see Data Source Web Server Controls in the MSDN Library.
Expression Web includes these data source controls:
Data source control |
Description |
---|---|
SqlDataSource Control |
Enables you to work with ADO.NET managed data providers, which provide access to Microsoft SQL Server, OLE DB, ODBC, or Oracle databases. |
AccessDataSourceControl |
Enables you to work with a Microsoft Access database. |
XmlDataSource Control |
Enables you to work with an XML file, which is especially useful for hierarchical ASP.NET server controls such as the TreeView or Menu control. |
SiteMapDataSource Control |
Used with ASP.NET site navigation. |
You do not need to explicitly add a data source control to an .aspx file — when you choose a data source for a data-bound control on a page, Expression Web adds the appropriate data source control to the page.
Data-bound controls
Data-bound controls render data as markup to the requesting browser. A data-bound control can bind to a data source control and automatically fetch data at the appropriate time in the page request lifecycle. Data-bound controls can take advantage of the capabilities provided by a data source control including sorting, paging, caching, filtering, updating, deleting, and inserting. A data-bound control connects to a data source control through its DataSourceID property. For more information on the ASP.NET data-bound controls, see Data Web Server (ASP.NET) Controls in the MSDN Library.
Expression Web includes these data-bound controls.
Data-bound control |
Description |
---|---|
List Controls |
Renders data in a variety of lists format. List controls include the BulletedList Control, CheckBoxList Control, DropDownList Control, ListBox, and RadioButtonList controls. |
AdRotator Control |
Renders advertisements on a page as an image that users can click to go to a URL associated with the advertisement. |
DataList Control |
Renders data in a table. Each item is rendered using an item template that you define. |
DetailsView Control |
Displays one record at a time in a tabular layout and enables you to edit, delete, and insert records. You can also page through multiple records. |
FormView Control |
Similar to the DetailsView control, but enables you to define a free-form layout for each record. The FormView control is like a DataList control for a single record. |
GridView Control |
Displays data in a table and includes support for editing, updating, sorting, and paging data without requiring code. |
Menu Control |
Renders data in a hierarchical dynamic menu that can include submenus. |
Repeater Control |
Renders data in a list. Each item is rendered using an item template that you define. |
TreeView Control |
Renders data in a hierarchical tree of expandable nodes. |