Cookie ASP.Net Tutorial

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

    void btnSubmit_Click(Object s, EventArgs e)
    {
        Response.Cookies["preferences"]["firstName"] = txtFirstName.Text;
        Response.Cookies["preferences"]["lastName"] = txtLastName.Text;
        Response.Cookies["preferences"]["favoriteColor"] = txtFavoriteColor.Text;
        Response.Cookies["preferences"].Expires = DateTime.MaxValue;
    }



    Set Cookie Values


    
    

            id="lblFirstName"
        Text="First Name:"
        AssociatedControlID="txtFirstName"
        Runat="server" />
    
            id="txtFirstName"
        Runat="server" />
    
            id="lblLastName"
        Text="Last Name:"
        AssociatedControlID="txtFirstName"
        Runat="server" />
    
            id="txtLastName"
        Runat="server" />
    
            id="lblFavoriteColor"
        Text="Favorite Color:"
        AssociatedControlID="txtFavoriteColor"
        Runat="server" />
    
            id="txtFavoriteColor"
        Runat="server" />
    
            id="btnSubmit"
        Text="Submit"
        OnClick="btnSubmit_Click"
        Runat="server" />