IHttpSessionState.Clear Method ()


The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Clears all values from the session-state item collection.

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

void Clear()

Clear performs the same function as RemoveAll.

The following code example implements the Clear method of the IHttpSessionState interface to delete all items from an internal session-state item collection.

public void Clear()

public void RemoveAll()

.NET Framework
Available since 2.0
Return to top