ADO Database ASP.Net

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


    
    

            id="grdProductCategories"
        DataKeyNames="Id"
        DataSourceID="srcProductCategories"
        AutoGenerateSelectButton="true"
        SelectedRowStyle-CssClass="selectedRow"
        Runat="server" />
            id="grdProducts"
        DataSourceID="srcProducts"
        Runat="server" />
            id="srcProductCategories"
        ConnectionString="<%$ ConnectionStrings:Products %>"
        SelectCommand="SELECT Id, Name FROM ProductCategories"
        Runat="server" />
            id="srcProducts"
        ConnectionString="<%$ ConnectionStrings:Products %>"
        SelectCommand="SELECT Title,Director FROM Products
            WHERE CategoryId=@CategoryId"
        Runat="server">
        
                    Name="CategoryId"
            ControlID="grdProductCategories"
            PropertyName="SelectedValue" />
        

    
    

    


            
File: Web.config

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