ZennoLab Assemblies Documentation
SetCookie Method
Example 
ZennoLab.CommandCenter Namespace > Instance Class : SetCookie Method

Type: System.String

The cookies data in format "Host\tDomainFlag\tPath\tSecureFlag\tExpiry\tName\tValue\tHttpOnlyFlag\tSessionFlag\r\n ...".

Sets cookie.
Syntax
public void SetCookie( 
   string cookie
)

Parameters

cookie

Type: System.String

The cookies data in format "Host\tDomainFlag\tPath\tSecureFlag\tExpiry\tName\tValue\tHttpOnlyFlag\tSessionFlag\r\n ...".

Example
The following example uses the SetCookie method.
// format cookie string
string cookie = @".samy.pl	TRUE	/	FALSE	05/18/2033 06:33:20	__utmc	27102015	FALSE	TRUE
samy.pl	FALSE	/evercookie/	FALSE	05/18/2033 06:33:20	evercookie_png	398	FALSE	TRUE";
// load cookie
instance.SetCookie(cookie);
// format cookie string
$cookie = @".samy.pl	TRUE	/	FALSE	05/18/2033 06:33:20	__utmc	27102015	FALSE	TRUE
samy.pl	FALSE	/evercookie/	FALSE	05/18/2033 06:33:20	evercookie_png	398	FALSE	TRUE";
// load cookie
$instance->SetCookie($cookie);
Requirements

Target Platforms: Desktop: Windows XP SP3 and older. Server: Windows Server 2003 and older.

See Also

Reference

Instance Class
Instance Members
ClearCookie Method
LoadCookie Method
SaveCookie Method
GetCookie Method