Cookie ASP.Net Tutorial

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

    void Page_Load()
    {
        if (Request.Cookies["preferences"] != null)
        {
            lblFirstName.Text = Request.Cookies["preferences"]["firstName"];
            lblLastName.Text = Request.Cookies["preferences"]["lastName"];
            lblFavoriteColor.Text = Request.Cookies["preferences"]["favoriteColor"];
        }
    }



    Get Cookie Values


    
    

    First Name:
            id="lblFirstName"
        Runat="server" />
    
    Last Name:
            id="lblLastName"
        Runat="server" />
    
    Favorite Color:
            id="lblFavoriteColor"
        Runat="server" />