IHttpSessionState.Remove Method (String)

 

Deletes an item from the session-state item collection.

Namespace:   System.Web.SessionState
Assembly:  System.Web (in System.Web.dll)

void Remove(
	string name
)

Parameters

name
Type: System.String

The name of the item to delete from the session-state item collection.

The following code example implements the Remove method of the IHttpSessionState interface to delete a session-state item from the session-state item collection by key name.

public void Remove(string name)
{
  pSessionItems.Remove(name);
}

.NET Framework
Available since 2.0
Return to top
Show: