PersonalizationDictionary.Contains Method (String)

 

Returns a value indicating whether a piece of custom state information with the same key is contained in the personalization dictionary.

Namespace:   System.Web.UI.WebControls.WebParts
Assembly:  System.Web (in System.Web.dll)

abstract Contains : 
        key:string -> bool
override Contains : 
        key:string -> bool

Parameters

key
Type: System.String

A key value.

Return Value

Type: System.Boolean

true if the provided key matches a key in the personalization dictionary; otherwise, false.

Exception Condition
ArgumentException

key is either an empty string (""), or trimming key results in an empty string.

ArgumentNullException

key is null.

Use this method to determine whether a piece of custom state information is contained in a personalization dictionary.

.NET Framework
Available since 2.0
Return to top
Show: