SetCookie Method

HttpResponseWrapper.SetCookie Method (HttpCookie)

 

Updates an existing cookie in the cookie collection.

Namespace:   System.Web
Assembly:  System.Web (in System.Web.dll)

public override void SetCookie(
	HttpCookie cookie
)

Parameters

cookie
Type: System.Web.HttpCookie

The cookie in the collection to be updated.

Exception Condition
HttpException

The cookie was set after the HTTP headers were sent.

.NET Framework
Available since 3.5
Return to top
Show:
© 2016 Microsoft