System.Web.HttpCookie Class

Provides a type-safe way to create and manipulate individual HTTP cookies.

See Also: HttpCookie Members


public sealed class HttpCookie


The System.Web.HttpCookie class gets and sets properties of individual cookies. The System.Web.HttpCookieCollection class provides methods to store, retrieve, and manage multiple cookies.

ASP.NET includes two intrinsic cookie collections. The collection accessed through the HttpRequest.Cookies collection of the System.Web.HttpRequest object contains cookies transmitted by the client to the server in the Cookie header. The collection accessed through the HttpResponse.Cookies collection of the System.Web.HttpResponse object contains new cookies created on the server and transmitted to the client in the Set-Cookie HTTP response header.


Namespace: System.Web
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0,