Application.GetCookie Method
Assembly: PresentationFramework (in presentationframework.dll)
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 type | Condition |
|---|---|
| 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.
- FileIOPermission for getting the cookie for a file-based Uri. Associated enumeration: Read.
- WebPermission for getting the cookie for a non-file-based Uri. Associated enumeration: ConnectList.
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.