UserControl::Session Property
.NET Framework (current version)
Gets the HttpSessionState object for the current Web request.
Assembly: System.Web (in System.Web.dll)
public: [BrowsableAttribute(false)] property HttpSessionState^ Session { HttpSessionState^ 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.
.NET Framework
Available since 1.1
Available since 1.1
Show: