Session Cookie ASP.Net

<%@ Page Language="C#" %>


    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" />