ADO Database ASP.Net

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

    void Page_Load()
    {
        if (!Page.IsPostBack)
            grdProducts.SelectedIndex = 0;
    }
    protected void dtlProducts_ItemUpdated(object sender, DetailsViewUpdatedEventArgs e)
    {
        grdProducts.DataBind();
    }



    
    
    
            id="grdProducts"
        DataSourceID="srcProducts"
        DataKeyNames="Id"
        AutoGenerateSelectButton="true"
        Runat="server" />
    

    
            id="dtlProducts"
        DefaultMode="Edit"
        AutoGenerateEditButton="true"
        AllowPaging="true"
        DataSourceID="srcProductDetails"
        DataKeyNames="Id"
        Runat="server" OnItemUpdated="dtlProducts_ItemUpdated" />
            id="srcProducts"
        ConnectionString="<%$ ConnectionStrings:Products %>"
        SelectCommand="SELECT Id,Title FROM Products"
        Runat="server" />
    

            id="srcProductDetails"
        ConnectionString="<%$ ConnectionStrings:Products %>"
        SelectCommand="SELECT Id,Title,Director,InStocks FROM Products WHERE Id=@ProductId"
        UpdateCommand="UPDATE Products SET Title=@Title,Director=@Director, InStocks=@InStocks WHERE Id=@Id"
        Runat="server">
        
            
        

    
    

    


File: Web.config

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