Data Binding ASP.Net Tutorial

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.
<%@ Page Language="C#" %>
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">


    Show Control Parameter


    
    

            id="ddlProductCategory"
        DataSourceID="srcProductCategories"
        DataTextField="Name"
        DataValueField="Id"
        Runat="server" />
            id="btnSelect"
        Text="Select"
        ToolTip="Select Product"
        Runat="server" />
    
            id="grdProducts"
        DataSourceID="srcProducts"
        Runat="server" />
            id="srcProductCategories"
        ConnectionString="Server=.\SQLExpress;
        Trusted_Connection=True;AttachDbFileName=|DataDirectory|MyDatabase.mdf;
        User Instance=True"
        SelectCommand="SELECT Id,Name FROM ProductCategories"
        Runat="server" />
            id="srcProducts"
        ConnectionString="Data Source=.\SQLExpress;
            AttachDbFilename=|DataDirectory|MyDatabase.mdf;
            Integrated Security=True;User Instance=True"
        SelectCommand="SELECT Title,Director FROM Products
            WHERE CategoryId=@Id"
        Runat="server">
        
                            Name="Id"
                Type="int32"
                ControlID="ddlProductCategory" />