Problem: Losing Session values when deleting files and folders !!

iquttaineh

New member
Joined
Apr 14, 2005
Messages
1
Programming Experience
3-5
Hi,
I have a problem with session variables. I have a session variable called Session("UserID"), and it has a value, but when i delete a directory or file, the session variable loses it's value and became NOTHING. I do the following when deleting folder:-

VB.NET:
 Dim DR As New DirectoryInfo(Me.DIR_Path)
 DR.Delete(True)
 Response.Redirect(URL_String)
And on Page_load:-
VB.NET:
 Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Session("UserID") = Nothing Then
            Response.Redirect("~/Login.aspx")
        End If
    End Sub
So, it always redirecting me to the Login page !!
 
Back
Top