Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
0 out of 2 rated this helpful - Rate this topic

Application.GetCookie Method

Retrieves a cookie for the location specified by a Uri.

Namespace: System.Windows
Assembly: PresentationFramework (in presentationframework.dll)

public static string GetCookie (
	Uri uri
)
public static String GetCookie (
	Uri uri
)
public static function GetCookie (
	uri : Uri
) : String
You cannot use methods in XAML.

Parameters

uri

The Uri that specifies the location for which a cookie was created.

Return Value

A String value, if the cookie exists; otherwise, a Win32Exception is raised.
Exception typeCondition

InvalidOperationException

Application is hosted inside an HTMLIFrame.

Win32Exception

A Win32 error is raised by InternetGetCookie (called by GetCookie) if a problem occurs when attempting to retrieve the specified cookie.

See SetCookie for information about cookies and how to create them.

GetCookie retrieves a cookie for the specified Uri. If the cookie can't be retrieved, a Win32Exception is raised.

See Application Cookies Sample for an example of creating and retrieving cookies.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft. All rights reserved.