ADO Net Database ASP.Net Tutorial

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

    void Page_Load()
    {
        Session["ProductCategoryName"] = "Animation";
    }



    Show SessionParameter


    
    

            id="grdProducts"
        DataSourceID="srcProducts"
        Runat="server" />
            id="srcProducts"
        SelectCommand="SELECT Name As Category,Title,Director
            FROM Products
            INNER JOIN ProductCategories
            ON CategoryId = ProductCategories.id
            WHERE Name=@Name"
        ConnectionString="<%$ ConnectionStrings:Products %>"
        Runat="server">
        
                    Name="Name"
            SessionField="ProductCategoryName" />
        

    
    

    


File: Web.config

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