HttpResponse.SetCookie Method (HttpCookie)
.NET Framework (current version)
This API supports the product infrastructure and is not intended to be used directly from your code.
Updates an existing cookie in the cookie collection.
Assembly: System.Web (in System.Web.dll)
Parameters
- cookie
-
Type:
System.Web.HttpCookie
The cookie in the collection to be updated.
| Exception | Condition |
|---|---|
| HttpException | The cookie is set after the HTTP headers have been sent. |
| HttpException | Attempted to set the cookie after the HTTP headers were sent. |
| HttpException | The cookie is set after the HTTP headers have been sent. |
| HttpException | Attempted to set the cookie after the HTTP headers were sent. |
.NET Framework
Available since 1.1
Available since 1.1
Show: