Data Binding ASP.Net Tutorial

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


    Declarative DataBinding


    
    

            id="ddlProducts"
        DataSourceID="srcProducts"
        DataTextField="Title"
        DataValueField="Id"
        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" />