This documentation is archived and is not being maintained.

Control.ViewStateIgnoresCase Property

Gets a value that indicates whether the StateBag object is case-insensitive.

[Visual Basic]
Protected Overridable ReadOnly Property ViewStateIgnoresCase As _
protected virtual bool ViewStateIgnoresCase {get;}
protected: __property virtual bool get_ViewStateIgnoresCase();
protected function get ViewStateIgnoresCase() : Boolean;

Property Value

true if the StateBag instance is case-insensitive; otherwise, false. The default is true.


Override this method if you create a custom server control that saves its view state taking case into account. 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.


[Visual Basic] The following example overrides the ViewStatIgnoresCase property to return true.

[Visual Basic] 
' 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
      Return True
   End Get
End Property

[C#, C++, JScript] No example is available for C#, C++, or JScript. To view a Visual Basic example, click the Language Filter button Language Filter in the upper-left corner of the page.


Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also

Control Class | Control Members | System.Web.UI Namespace | StateBag | ViewState