Control.ViewStateIgnoresCase 屬性

定義

取得值,指出 StateBag 物件是否不區分大小寫。

protected:
 virtual property bool ViewStateIgnoresCase { bool get(); };
[System.ComponentModel.Browsable(false)]
protected virtual bool ViewStateIgnoresCase { get; }
[<System.ComponentModel.Browsable(false)>]
member this.ViewStateIgnoresCase : bool
Protected Overridable ReadOnly Property ViewStateIgnoresCase As Boolean

屬性值

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

適用於

另請參閱