Many of the DataSource controls support ASP.NET parameters. You use ASP.NET parameters to modify the commands that a DataSource control executes.
Different types of DataSource controls use ASP.NET parameters to represent different types of things. When you use ASP.NET parameters with a SqlDataSource control, the ASP.NET parameters represent ADO.NET parameters. In other words, they represent parameters used with SQL statements.
When you use parameters with the ObjectDataSource control, the ASP.NET parameters represent method parameters. They represent parameters passed to a particular method of a business object.
The SqlDataSource, AccessDataSource, LinqDataSource, and ObjectDataSource controls all support the following types of Parameter objects:
Different types of DataSource controls use ASP.NET parameters to represent different types of things. When you use ASP.NET parameters with a SqlDataSource control, the ASP.NET parameters represent ADO.NET parameters. In other words, they represent parameters used with SQL statements.
When you use parameters with the ObjectDataSource control, the ASP.NET parameters represent method parameters. They represent parameters passed to a particular method of a business object.
The SqlDataSource, AccessDataSource, LinqDataSource, and ObjectDataSource controls all support the following types of Parameter objects:
- Parameter : Represents an arbitrary static value.
- ControlParameter : Represents the value of a control or page property.
- CookieParameter : Represents the value of a browser cookie.
- FormParameter : Represents the value of an HTML form field.
- ProfileParameter : Represents the value of a Profile property.
- QueryStringParameter : Represents the value of a query string field.
- SessionParameter : Represents the value of an item stored in Session state.
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:
A DataBound control is associated with a particular data source control through its DataSourceID property.
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.
A DataBound control is associated with a particular data source control through its DataSourceID property.