Control.ViewStateIgnoresCase Control.ViewStateIgnoresCase Control.ViewStateIgnoresCase Control.ViewStateIgnoresCase Property

定義

取得值,指出 StateBag 物件是否不區分大小寫。Gets a value that indicates whether the StateBag object is case-insensitive.

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

屬性值

如果 StateBag 執行個體不區分大小寫,則為 true,否則,即為 falsetrue if the StateBag instance is case-insensitive; otherwise, false. 預設為 falseThe default is false.

範例

下列範例示範如何覆寫要傳回ViewStateIgnoresCase的屬性。 trueThe following example demonstrates how to override the ViewStateIgnoresCase property to return 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

備註

如果您建立的自訂伺服器控制項會儲存其檢視狀態,而不會將案例納入考慮,請覆寫這個方法。Override this method if you create a custom server control that saves its view state without taking case into account. 當您使用相同的索引鍵來執行多個物件,但使用不同的StateBag ViewState大小寫時,可以將儲存在與屬性相關聯的中。When you do so multiple objects with the same key, but with different casing, can be stored in the StateBag associated with the ViewState property.

適用於

另請參閱