StateManagedCollection.OnRemove Method

When overridden in a derived class, performs additional work before the System.Collections.IList.Remove or System.Collections.IList.RemoveAt method removes the specified item from the collection.

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

protected virtual void OnRemove (
	int index,
	Object value
protected void OnRemove (
	int index, 
	Object value
protected function OnRemove (
	index : int, 
	value : Object
Not applicable.



The zero-based index of the item to remove, which is used when System.Collections.IList.RemoveAt is called.


The object to remove from the StateManagedCollection, which is used when System.Collections.IList.Remove is called.

Collections derived from StateManagedCollection can override the OnRemove method to perform any additional work before an item is removed from the collection using the System.Collections.IList.Remove or System.Collections.IList.RemoveAt method.

Windows 98, Windows Server 2000 SP4, 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