IHttpSessionState.Clear Method ()

 

Clears all values from the session-state item collection.

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

Sub 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 Sub Clear() Implements IHttpSessionState.Clear 
  pSessionItems.Clear()
End Sub

Public Sub RemoveAll() Implements IHttpSessionState.RemoveAll
    Clear()
End Sub

.NET Framework
Available since 2.0
Return to top
Show: