ADO Net Database ASP.Net Tutorial

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


    Show Control Parameter


    
    

            id="ddlProducts"
        DataSourceID="srcProducts"
        DataTextField="Title"
        DataValueField="Id"
        Runat="server" />
            id="btnSelect"
        Text="Select"
        Runat="server" />
    
            id="dtlProduct"
        DataSourceID="srcProductDetails"
        Runat="server" />
            id="srcProducts"
        SelectCommand="SELECT Id,Title FROM Products"
        ConnectionString="<%$ ConnectionStrings:Products %>"
        Runat="server" />
            id="srcProductDetails"
        SelectCommand="SELECT * FROM Products
            WHERE Id=@Id"
        ConnectionString="<%$ ConnectionStrings:Products %>"
        Runat="server">
        
                            PropertyName="SelectedValue" />
        

    
    

    


File: Web.config

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