Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
SetCookie Method

HttpResponseWrapper.SetCookie Method

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.

ExceptionCondition
HttpException

The cookie was set after the HTTP headers were sent.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5 SP1
Show:
© 2015 Microsoft