Using ASP.NET Parameters with DataSource Controls in ASP.Net

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:
  • 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.
Tags: , , , , , , ,
Hot on Web:


About author