CookieHandler.WriteCore(Byte[], String, String, String, DateTime, Boolean, Boolean, HttpContext) CookieHandler.WriteCore(Byte[], String, String, String, DateTime, Boolean, Boolean, HttpContext) CookieHandler.WriteCore(Byte[], String, String, String, DateTime, Boolean, Boolean, HttpContext) CookieHandler.WriteCore(Byte[], String, String, String, DateTime, Boolean, Boolean, HttpContext) Method

Definition

When overridden in a derived class, writes a cookie associated with the specified request that has the specified name, value, domain, path, expiration time, persistence and visibility.

protected:
 abstract void WriteCore(cli::array <System::Byte> ^ value, System::String ^ name, System::String ^ path, System::String ^ domain, DateTime expirationTime, bool secure, bool httpOnly, System::Web::HttpContext ^ context);
protected abstract void WriteCore (byte[] value, string name, string path, string domain, DateTime expirationTime, bool secure, bool httpOnly, System.Web.HttpContext context);
abstract member WriteCore : byte[] * string * string * string * DateTime * bool * bool * System.Web.HttpContext -> unit
Protected MustOverride Sub WriteCore (value As Byte(), name As String, path As String, domain As String, expirationTime As DateTime, secure As Boolean, httpOnly As Boolean, context As HttpContext)

Parameters

value
Byte[]

The cookie value.

name
String String String String

The name of the cookie.

path
String String String String

The path for the cookie

domain
String String String String

The domain for the cookie

expirationTime
DateTime DateTime DateTime DateTime

The expiration time for the cookie, or MinValue for a session (session-only) cookie.

secure
Boolean Boolean Boolean Boolean

true if the cookie should only be used over an SSL connection; otherwise, false.

httpOnly
Boolean Boolean Boolean Boolean

true if the cookie should be hidden from client script; otherwise, false.

Remarks

Called from the overloaded Write methods to do the actual work of writing the cookie. The Write methods will ensure that value is a non-empty byte array and that name and path are non-empty strings.

Notes to Inheritors

You must override this method. The implementation is entirely up to the developer. In the typical case, implementations write the cookie data to the Cookies collection, however, this is not a requirement. Most parameters of the method are typically used to set equivalent properties on one or more HttpCookie objects.

Applies to