Access to Session Object Property

  • Thread starter Thread starter Dorsa
  • Start date Start date
D

Dorsa

Hi,
I'm new to ASP.net and VB.net . I have saved a class ( SecurityClass)
that has one property ( LoggedIn ) in the Session Object as
SecurityObj. I need to check the property in the SecurityObject
whether it's True or False.
Here is my Code but I know there is another way to do it.
Please Help!
Thanks
Dorsa


Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim SecurityObj As securityClass

If Session.Item("SecurityObj") Is Nothing Then
SecurityObj = New securityClass()
Else
SecurityObj = CType(Session.Item("SecurityObj"),
securityClass)
End If

Session("SecurityObj") = SecurityObj
Session("LoggedIn") = SecurityObj.LoggedIn

If Not Page.IsPostBack Then
If Session("LoggedIn") Then
chkLoggedIn.Checked = True
Else
chkLoggedIn.Checked = False
End If
End If
End Sub
 
Hi Dorsa,

There is someone sometimes active in this newsgroup who is also active in
the security newsgroup. But he said he is very busy with security now.

To have a better change I would place this message direct in that newsgroup
also.

microsoft.public.dotnet.security

Cor
 
Back
Top