Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

CookieContainer.GetCookieHeader Method

Gets the HTTP cookie header that contains cookies pertaining to the specified Uniform Resource Identifier (URI).

Namespace:  System.Net
Assembly:  System.Net (in System.Net.dll)
public string GetCookieHeader(
	Uri uri
)

Parameters

uri
Type: System.Uri
The URI to retrieve cookies for.

Return Value

Type: System.String
A string representing the cookie header associated with the specified URI.
ExceptionCondition
ArgumentNullException

uri is null.

The HTTP cookie header is created by adding a string representation of each cookie associated with the specified URI; seperating each cookie in the string with a semicolon. The exact format of each cookie string depends on the RFC the cookie conforms to.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.