IResponseCookies.Delete Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Delete(String) |
Sets an expired cookie. |
Delete(String, CookieOptions) |
Sets an expired cookie. |
- Source:
- IResponseCookies.cs
Sets an expired cookie.
public:
void Delete(System::String ^ key);
C#
public void Delete (string key);
abstract member Delete : string -> unit
Public Sub Delete (key As String)
Parameters
- key
- String
Name of the cookie to expire.
Applies to
ASP.NET Core 9.0 and other versions
Product | Versions |
---|---|
ASP.NET Core | 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0 |
- Source:
- IResponseCookies.cs
Sets an expired cookie.
public:
void Delete(System::String ^ key, Microsoft::AspNetCore::Http::CookieOptions ^ options);
C#
public void Delete (string key, Microsoft.AspNetCore.Http.CookieOptions options);
abstract member Delete : string * Microsoft.AspNetCore.Http.CookieOptions -> unit
Public Sub Delete (key As String, options As CookieOptions)
Parameters
- key
- String
Name of the cookie to expire.
- options
- CookieOptions
CookieOptions used to discriminate the particular cookie to expire. The Domain and Path values are especially important.
Applies to
ASP.NET Core 9.0 and other versions
Product | Versions |
---|---|
ASP.NET Core | 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0 |