Cookie ASP.Net Tutorial

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

    protected void btnDelete_Click(object sender, EventArgs e)
    {
        Response.Cookies[txtCookieName.Text].Expires  = DateTime.Now.AddDays(-1);
    }



    Delete Cookie


    
    

            id="lblCookieName"
        Text="Cookie Name:"
        AssociatedControlID="txtCookieName"
        Runat="server" />
            id="txtCookieName"
        Runat="server" />
            id="btnDelete"
        Text="Delete Cookie"
        OnClick="btnDelete_Click"
        Runat="server" />