Assembly: PresentationFramework (in presentationframework.dll)
The Uri that specifies the location for which the cookie should be created.
The String that contains the cookie data.
A cookie is an arbitrary piece of data that can be stored by an application on the client machine during or across application sessions.
Cookie data typically takes the form of a name/value pair in the following format:
When this is passed to SetCookie, along with the Uri of the location for which the cookie should be set, a cookie is created in-memory, and is only available to the process that created it.
To store a cookie across application sessions, an expiration date must be added to the cookie, using the following format:
NAME=VALUE; expires=DAY, DD-MMM-YYYY HH:MM:SS GMT
A cookie with an expiration date is stored in the current Windows installation's temporary internet files folder until the cookie expires.
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 EditionThe Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.