G
GreggTB
I've got an page (LOGIN.ASPX) that receives the user's login
information. During the page load, it checks the credentials against a
database and, if validation is successful, creates an instance of an
object that stores the user's basic profile data (username, user type,
associated sales region, etc.).
I've been taking this user info and placing it in the Session object
like so...
Session["USER"] = user;
Originally, I'd been trying to use Response.Redirect to send the users
to the next appropriate page in the application but it seems that the
Redirect kills the current thread and thus the session data is lost.
So I tried using Server.Transfer which seems to work but, of course,
the client's browser still shows "LOGIN.ASPX" in the address field. Not
really a problem except for two things...
.....when the user hits F5 to refresh the page, the page executes from
the beginning and walks through the login process all over again.
....,if the page displays a link to another page in the same
application, clicking the link will also cause the contents of the
Session object to disappear.
My questions are:
1.) Is there any way to use Redirect from the login page without losing
the contents of the Session object?
2.) Is there a more effective/efficient way to use Server.Transfer?
Any assistance would be greatly appreciated! Thanks!
information. During the page load, it checks the credentials against a
database and, if validation is successful, creates an instance of an
object that stores the user's basic profile data (username, user type,
associated sales region, etc.).
I've been taking this user info and placing it in the Session object
like so...
Session["USER"] = user;
Originally, I'd been trying to use Response.Redirect to send the users
to the next appropriate page in the application but it seems that the
Redirect kills the current thread and thus the session data is lost.
So I tried using Server.Transfer which seems to work but, of course,
the client's browser still shows "LOGIN.ASPX" in the address field. Not
really a problem except for two things...
.....when the user hits F5 to refresh the page, the page executes from
the beginning and walks through the login process all over again.
....,if the page displays a link to another page in the same
application, clicking the link will also cause the contents of the
Session object to disappear.
My questions are:
1.) Is there any way to use Redirect from the login page without losing
the contents of the Session object?
2.) Is there a more effective/efficient way to use Server.Transfer?
Any assistance would be greatly appreciated! Thanks!