Public Class MySession
'private constructor
Private Sub New()
Dim i As Integer
i = 1
End Sub
Public Shared ReadOnly Property Current As MySession
Get
Dim session As MySession = HttpContext.Current.Session("MySession")
If (session Is Nothing) Then
session = New MySession()
HttpContext.Current.Session("MySession") = session
End If
Return session
End Get
End Property
Public Property EmployeeID() As String
Get
Return HttpContext.Current.Session("EmployeeID").ToString
End Get
Set(ByVal value As String)
HttpContext.Current.Session("EmployeeID") = value
End Set
End Property
End Class