Cookie ASP.Net Tutorial

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

    void Page_Load()
    {
        int counter = 0;
        if (Request.Cookies["counter"] != null)
            counter = Int32.Parse(Request.Cookies["counter"].Value);
        counter++;
        Response.Cookies["counter"].Value = counter.ToString();
        Response.Cookies["counter"].Expires = DateTime.Now.AddYears(2);
        lblCounter.Text = counter.ToString();
    }



    Set Persistent Cookie


    
    

    You have visited this page
            id="lblCounter"
        Runat="server" />
    times!