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.

適用於

另請參閱