Edit

Share via


CookieHandler.Delete Method

Definition

Deletes a cookie.

Overloads

Delete()

Deletes the cookie associated with the current request that has the default name, ___domain, and path.

Delete(String)

Deletes the cookie associated with the current request that has the specified name and the default ___domain and path.

Delete(HttpContext)

Deletes the cookie associated with the current request that has the default name, ___domain, and path.

Delete(String, HttpContext)

Deletes the cookie associated with the specified request that has the specified name and the default ___domain and path.

Delete(String, String, String, HttpContext)

Deletes the cookie associated with the specified request that has the specified name, path, and ___domain.

Delete()

Deletes the cookie associated with the current request that has the default name, ___domain, and path.

public:
 void Delete();
public void Delete();
member this.Delete : unit -> unit
Public Sub Delete ()

Remarks

The name, ___domain and path are specified by the Name, Domain, and Path properties. The request is specified by HttpContext.Current

Applies to

Delete(String)

Deletes the cookie associated with the current request that has the specified name and the default ___domain and path.

public:
 void Delete(System::String ^ name);
public void Delete(string name);
member this.Delete : string -> unit
Public Sub Delete (name As String)

Parameters

name
String

The name of the cookie.

Exceptions

name is null or empty.

Remarks

The ___domain and path are specified by the Domain and Path properties. The request is specified by HttpContext.Current

Applies to

Delete(HttpContext)

Deletes the cookie associated with the current request that has the default name, ___domain, and path.

public:
 void Delete(System::Web::HttpContext ^ context);
public void Delete(System.Web.HttpContext context);
member this.Delete : System.Web.HttpContext -> unit
Public Sub Delete (context As HttpContext)

Parameters

context
HttpContext

The HttpContext for the request.

Remarks

The name, ___domain and path are specified by the Name, Domain, and Path properties.

Applies to

Delete(String, HttpContext)

Deletes the cookie associated with the specified request that has the specified name and the default ___domain and path.

public:
 void Delete(System::String ^ name, System::Web::HttpContext ^ context);
public void Delete(string name, System.Web.HttpContext context);
member this.Delete : string * System.Web.HttpContext -> unit
Public Sub Delete (name As String, context As HttpContext)

Parameters

name
String

The name of the cookie.

context
HttpContext

The HttpContext for the request.

Exceptions

name is null or empty.

Remarks

The ___domain and path are specified by the Domain and Path properties.

Applies to

Delete(String, String, String, HttpContext)

Deletes the cookie associated with the specified request that has the specified name, path, and ___domain.

public:
 void Delete(System::String ^ name, System::String ^ path, System::String ^ ___domain, System::Web::HttpContext ^ context);
public void Delete(string name, string path, string ___domain, System.Web.HttpContext context);
member this.Delete : string * string * string * System.Web.HttpContext -> unit
Public Sub Delete (name As String, path As String, ___domain As String, context As HttpContext)

Parameters

name
String

The name of the cookie.

path
String

The path for the cookie.

___domain
String

The ___domain for the cookie.

context
HttpContext

The HttpContext for the request.

Exceptions

name is null or empty.

Applies to