| Author: Anand Babu S 23 Dec 2008 | Member Level: Gold Points : 2 |
Imports System.Web.SessionState
''' ''' Encapsulates the details of managing session variables. ''' Friend NotInheritable Class MySession
Private Const UserIdKey As String = "UserId"
Private Sub New() End Sub ''' ''' Returns the current Session object, if any. ''' Private Shared ReadOnly Property Session As HttpSessionState Get Return HttpContext.Current.Session End Get End Property ''' ''' Returns True if a valid Session object exists. ''' Public Shared ReadOnly Property Exists() As Boolean Get Return Not Session Is Nothing End Get End Property ''' ''' Gets the ID of the user who is currently logged onto ''' the system. ''' Public Shared Property UserId As Integer Get Return DirectCast(Session(UserIdKey), Integer) End Get Set(ByVal value As Integer) Session(UserIdKey) = value End Set End Property End Class
|
| Author: Prashant Mishra 26 Dec 2008 | Member Level: Bronze Points : 0 |
Hi meetu
Is there any way to use Request and response in Class file??
|