[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

Sessions

Asked by Alv45525 in Programming for ASP.NET, .NET, Microsoft Visual Basic.Net, .NET Framework 2.x

Tags: vb.net

Hello experts

i have a login page whereby a session is created..if the admin logs in, it will be directted to addproduct.aspx and if a user login, it will direct to home.aspx...now to prevent users from seeing other pages without login i used the following code on all the pages


        If (Session("Admin") Is Nothing) Then
            Response.Redirect("login.aspx")
        End If


        If (Session("User") Is Nothing) Then
            Response.Redirect("login.aspx")
        End If


Therefore once log in, the user is directed to home.aspx or addproduct.aspx ...now here is my problem, once logged in, if ever login.aspx is typed in the address bar, it directs the user to the page, even though the latter is already logged in...any solution for this??/ it tried to use

        If not (Session("Admin") Is Nothing) Then
            Response.Redirect("addproduct.aspx")
        End If

        If not (Session("User") Is Nothing) Then
            Response.Redirect("home.aspx")
        End If

on the login.aspx form load but it doesnt work


any suggestion please
[+][-]11/06/09 12:51 AM, ID: 25757601Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/06/09 02:24 AM, ID: 25757929Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/06/09 05:05 AM, ID: 25758716Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/13/09 11:00 AM, ID: 25816684Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]11/13/09 11:00 AM, ID: 25816686Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]11/13/09 12:05 PM, ID: 25817244Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091118-EE-VQP-93 - Hierarchy / EE_QW_3_20080625