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
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