PersonalizationDictionary.Remove Method

Removes a custom state entry based on the provided key.

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

public:
virtual void Remove (
	String^ key
)
public void Remove (
	String key
)
public function Remove (
	key : String
)
Not applicable.

Parameters

key

The key of the entry to be removed.

Exception typeCondition

ArgumentNullException

key is a null reference (Nothing in Visual Basic).

ArgumentException

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

Internally, when you remove a custom state entry, the count of the personalization dictionary is decremented by one. Any enumerators currently active against the dictionary should be invalidated.

No error occurs if you attempt to remove a nonexistent key.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show: