Data Binding ASP.Net Tutorial

<%@ Page Language="C#" %>
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

    protected void btnSelect_Click(object sender, EventArgs e)
    {
        lblSelectedProduct.Text = ddlProducts.SelectedItem.Text;
    }



    Select Product


    
    

            id="ddlProducts"
        DataSourceID="srcProducts"
        DataTextField="Title"
        DataValueField="Id"
        Runat="server" />
            id="btnSelect"
        Text="Select"
        OnClick="btnSelect_Click"
        Runat="server" />
    
            id="lblSelectedProduct"
        Runat="server" />
            id="srcProducts"
        SelectCommand="SELECT Id, Title FROM Products"
        ConnectionString="<%$ ConnectionStrings:Products %>"
        Runat="server" />
    

    


File: Web.config

  
             connectionString="Data Source=.\SQLEXPRESS;
         AttachDbFilename=|DataDirectory|MyDatabase.mdf;Integrated Security=True;User Instance=True" />