Public Shared Sub DestroyCookie(ByVal CookieName As String) Dim CookieObj As HttpCookie = HttpContext.Current.Request.Cookies("CookieName") If CookieObj IsNot Nothing Then CookieObj.Expires = DateTime.Now.AddDays(-1D) HttpContext.Current.Response.Cookies.Add(CookieObj) End If End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click DestroyCookie("xxxxxx.com") End Sub
Object reference not set to an instance of an object.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)