Class Cookie
- Namespace
- Dynamicweb.Environment
- Assembly
- Dynamicweb.Environment.dll
Provides a type safe way to work and manipulate http cookies
public class Cookie
- Inheritance
-
Cookie
- Inherited Members
Constructors
Cookie(NameValueCollection)
Initializes a new instance of the Cookie with the specified sub values collection, for internal use only
public Cookie(NameValueCollection values)
Parameters
values
NameValueCollection- To initialize the cookie with a collection of values
Cookie(string)
Initialize a new instance of the Cookie class with the specified name and an empty value
public Cookie(string name)
Parameters
name
string- The name of the Cookie
Cookie(string, string)
Initializes a new instance of the Cookie class with the specified name and value
public Cookie(string name, string value)
Parameters
Properties
Domain
Gets or sets the domain to associate the cookie with
public string Domain { get; set; }
Property Value
Expires
Gets or sets the expiration date and time for the cookie
public DateTime Expires { get; set; }
Property Value
HasKeys
Gets a value indicating whether a cookie has subkeys
public bool HasKeys { get; }
Property Value
HttpOnly
Gets or sets a value that specifies whether a cookie is accessible by client-side script
public bool HttpOnly { get; set; }
Property Value
this[string]
Gets the value for the specified key
public string this[string key] { get; set; }
Parameters
key
string- The key for which to get it's value
Property Value
Name
Gets or sets the name of a cookie
public string Name { get; set; }
Property Value
Path
Gets or sets the virtual path to transmit with the cookie
public string Path { get; set; }
Property Value
SameSite
Specifies the value for the SameSite attribute of the cookie
public Cookie.SameSiteMode SameSite { get; set; }
Property Value
Secure
Gets or sets a value indicating whether to transmit the cookie using secure sockets layer (SSL), that is over HTTPS only
public bool Secure { get; set; }
Property Value
Shareable
Determines whether the cookie is allowed to participate in output caching
public bool Shareable { get; set; }
Property Value
Value
Gets or sets an individual cookie value
public string Value { get; set; }
Property Value
Values
Gets a collection of key/value pairs that are contained within a single cookie object
public NameValueCollection Values { get; }