Dela via


HttpCookie.HttpOnly Property

Definition

Get or set a value that controls whether a script or other active content can access this HttpCookie.

public:
 property bool HttpOnly { bool get(); void set(bool value); };
bool HttpOnly();

void HttpOnly(bool value);
public bool HttpOnly { get; set; }
var boolean = httpCookie.httpOnly;
httpCookie.httpOnly = boolean;
Public Property HttpOnly As Boolean

Property Value

Boolean

bool

Whether a script or other active content can access this HttpCookie.

true if a script or other active content cannot access this HTTP cookie; otherwise, false. The default is false.

Remarks

When this property is set to true, a script or other active content cannot access this HTTP cookie.

Applies to