ADO Database ASP.Net

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

    protected void dtlProducts_ItemInserted(object sender, DetailsViewInsertedEventArgs e)
    {
        if (e.Exception != null)
        {
            e.ExceptionHandled = true;
            e.KeepInInsertMode = true;
            lblError.Visible = true;
        }
    }



    Insert Errors


    
    

            id="lblError"
        Text="Could not insert record"
        Visible="false"
        EnableViewState="false"
        CssClass="error"
        Runat="server" />
            id="dtlProducts"
        AllowPaging="true"
        DataSourceID="srcProducts"
        AutoGenerateInsertButton="true"
        OnItemInserted="dtlProducts_ItemInserted"
        Runat="server" />
            id="srcProducts"
        ConnectionString="<%$ ConnectionStrings:Products %>"
        SelectCommand="SELECT Title,Director,InStocks FROM Products"
        InsertCommand="INSERT Products (Title,Director,InStocks)VALUES (@Title,@Director,
        Runat="server" />
    

    


File: Web.config

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