CookieHandlerElement.HideFromScript Property


Gets or sets a value that specifies whether the httpOnly property of the cookies written by this handler should be set.

 property bool HideFromScript { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("hideFromScript", DefaultValue=Mono.Cecil.CustomAttributeArgument, IsRequired=false)]
public bool HideFromScript { get; set; }
[<System.Configuration.ConfigurationProperty("hideFromScript", DefaultValue=Mono.Cecil.CustomAttributeArgument, IsRequired=false)>]
member this.HideFromScript : bool with get, set
Public Property HideFromScript As Boolean

Property Value


true if the httpOnly property should be set; otherwise, false. The default is true.



Controls whether the "HttpOnly" flag is emitted for any cookies written. Certain Web browsers honor this flag by keeping client-side script from accessing the cookie value.

Represents the hideFromScript attribute of the <cookieHandler> element.

Applies to

See also