UserControl.Session Property

 
System_CAPS_noteNote

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

Gets the HttpSessionState object for the current Web request.

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

[<BrowsableAttribute(false)>]
member Session : HttpSessionState with get

Property Value

Type: System.Web.SessionState.HttpSessionState

An HttpSessionState object associated with the Page that contains the UserControl instance.

The following example adds values to the Session property of a user control. The myControl.Session.Add syntax inserts the values of two TextBox Web server controls to the session associated with the user control and the page that contains it.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: