Table of Contents

Class Cookie

Namespace
Dynamicweb.Environment
Assembly
Dynamicweb.Core.dll

Provides a type safe way to work and manipulate http cookies

public class Cookie
Inheritance
Cookie
Inherited Members

Constructors

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

Initializes a new instance of the Cookie class with the specified name and value

public Cookie(string name, string value)

Parameters

name string

The name of the cookie

value string

The value of the cookie

Properties

Gets or sets the domain to associate the cookie with

public string? Domain { get; set; }

Property Value

string

Gets or sets the expiration date and time for the cookie

public DateTime Expires { get; set; }

Property Value

DateTime

Gets a value indicating whether a cookie has subkeys

public bool HasKeys { get; }

Property Value

bool

Gets or sets a value that specifies whether a cookie is accessible by client-side script

public bool HttpOnly { get; set; }

Property Value

bool

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

string

Gets or sets the name of a cookie

public string Name { get; set; }

Property Value

string

Gets or sets the virtual path to transmit with the cookie

public string Path { get; set; }

Property Value

string

Specifies the value for the SameSite attribute of the cookie

public Cookie.SameSiteMode SameSite { get; set; }

Property Value

Cookie.SameSiteMode

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

bool

Determines whether the cookie is allowed to participate in output caching

public bool Shareable { get; set; }

Property Value

bool

Gets or sets an individual cookie value

public string Value { get; set; }

Property Value

string

Gets a collection of key/value pairs that are contained within a single cookie object

public NameValueCollection Values { get; }

Property Value

NameValueCollection
To top