CookieHandlerElement.HideFromScript 属性
定义
获取或设置指定是否应设置此处理程序编写的 Cookie 的 httpOnly 属性的值。Gets or sets a value that specifies whether the httpOnly property of the cookies written by this handler should be set.
public:
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
属性值
如果应设置 true 属性,则为 httpOnly;否则为 false。true if the httpOnly property should be set; otherwise, false. 默认值为 true。The default is true.
- 属性
注解
控制是否为写入的任何 cookie 发出 "HttpOnly" 标志。Controls whether the "HttpOnly" flag is emitted for any cookies written. 某些 Web 浏览器通过保持客户端脚本访问 cookie 值来服从此标志。Certain Web browsers honor this flag by keeping client-side script from accessing the cookie value.
表示 hideFromScript < cookieHandler > 元素的特性。Represents the hideFromScript attribute of the <cookieHandler> element.