Class CookieHelper
Provides common ways to manage cookie.
Inheritance
System.Object
CookieHelper
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Business.Commerce
Assembly: EPiServer.Business.Commerce.dll
Version: 10.8.0Syntax
public static class CookieHelper
Methods
Get(String)
Gets value from cookie by key.
Declaration
public static string Get(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key. |
Returns
Type | Description |
---|---|
System.String | Value that saved in the cookie |
Get(String, Boolean)
Gets value from cookie by key.
Declaration
public static string Get(string key, bool decrypt)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key. |
System.Boolean | decrypt | if set to |
Returns
Type | Description |
---|---|
System.String | Value that saved in the cookie |
Remove(String)
Removes the specified key from cookie.
Declaration
public static void Remove(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key. |
Set(String, String)
Sets the specified value to cookie by key.
Declaration
public static void Set(string key, string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key. |
System.String | value | The value. |
Set(String, String, Boolean)
Sets the specified value to cookie by key.
Declaration
public static void Set(string key, string value, bool encrypt)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key. |
System.String | value | The value. |
System.Boolean | encrypt | if set to |