JHCookie.Set Method (String, String, Nullable(DateTime))

DCSoft.DBUtilityGeneric

JHCookieSet Method (String, String, NullableDateTime)
设置 Cookie 的值,该 value 值会被去除首尾空格并编码后写入 Cookie

Namespace: DCSoft.Utility.Web
Assembly: DCSoft.Utility (in DCSoft.Utility.dll) Version: 0.0.0.0 (1.0.0.0)
Syntax
C#
public static bool Set(
	string name,
	string value,
	Nullable<DateTime> expires
)

Parameters

name
Type: SystemString
键名称
value
Type: SystemString
要写入的值
expires
Type: SystemNullableDateTime
设置该 Cookie 的过期日期和时间

Return Value

Type: Boolean
返回一个值,该值指示是否设置成功
See Also