Control.ViewStateIgnoresCase 属性    
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取一个值,该值指示 StateBag 对象是否不区分大小写。
protected:
 virtual property bool ViewStateIgnoresCase { bool get(); };[System.ComponentModel.Browsable(false)]
protected virtual bool ViewStateIgnoresCase { get; }[<System.ComponentModel.Browsable(false)>]
member this.ViewStateIgnoresCase : boolProtected Overridable ReadOnly Property ViewStateIgnoresCase As Boolean属性值
如果 StateBag 实例不区分大小写,则为 true;否则为 false。 默认值为 false。
- 属性
示例
以下示例演示如何重写 ViewStateIgnoresCase 属性以返回 true。
// Override the ViewStateIgnoresCase property to allow the same
// entries with different casing to be stored in the control's
// ViewState property.
protected override bool ViewStateIgnoresCase
{
        get
        { 
                return true; 
        }
}
' Override the ViewStateIgnoresCase property to allow the same
' entries with different casing to be stored in the control's
' ViewState property.
Overrides Protected ReadOnly Property ViewStateIgnoresCase As Boolean
   Get
      Return True
   End Get
End Property
注解
如果创建保存其视图状态而不考虑大小写的自定义服务器控件,请重写此方法。 执行此操作时,可以将具有相同键但大小写不同的多个对象存储在与 ViewState 属性关联的 中StateBag。