ADO Net Database ASP.Net Tutorial

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

    void Page_Load()
    {
        if (Request.Form["AddProduct"] != null)
            srcProducts.Insert();
    }



    Show FormParameter


    
        Product Title:
        
        Product Director:
        
        
    
    
    

            id="grdProducts"
        DataSourceID="srcProducts"
        Runat="server" />
            id="srcProducts"
        SelectCommand="SELECT * FROM Products"
        InsertCommand="INSERT Products (Title,Director,CategoryId,DateReleased)
            VALUES (@Title,@Director,0,'12/25/1966')"
        ConnectionString="<%$ ConnectionStrings:Products %>"
        Runat="server">
        
                            FormField="txtTitle" DefaultValue="Untitled" />
                            FormField="txtDirector" DefaultValue="Allen Smithee" />
        

    
    

    


File: Web.config

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