K
Kev
Hi all,
I hope someone understands this better than I do. I have an ASP.NET
app using a MasterPage (which I actually created in DreamWeaver then
copied the HTML to the MasterPage). So far so good.
The master page has a fancy nav menu (a SpryMenu) at the top - this
does not cause post backs - just a fancy collection of hyperlinks.
I want to track the currently logged in user in the View State. I do
this thus:
If (correct password)
{
Session["USERID"] = userid;
Server.Transfer("MyAccount.aspx");
}
And in all pages do something like
if (Session["USERID"] == null)
Response.Redirect("Login.aspx");
At this point I am on MyAccount.aspx via a Server.Transfer. I can
choose any page in my fancy nav menu, which are just hyperlinks, and
in the respective Page_Load I can get the userid from the session.
But only the once. That page will load fine and display user
information from the database etc. But if I choose another page from
the nav menu - even the same page, the Session variables have gone.
The Session.SessionID is the same but Session.Count is 0.
Can anyone shed any light on what may be happening behind the scenes -
I am perplexed.
Thanks
Kev
I hope someone understands this better than I do. I have an ASP.NET
app using a MasterPage (which I actually created in DreamWeaver then
copied the HTML to the MasterPage). So far so good.
The master page has a fancy nav menu (a SpryMenu) at the top - this
does not cause post backs - just a fancy collection of hyperlinks.
I want to track the currently logged in user in the View State. I do
this thus:
If (correct password)
{
Session["USERID"] = userid;
Server.Transfer("MyAccount.aspx");
}
And in all pages do something like
if (Session["USERID"] == null)
Response.Redirect("Login.aspx");
At this point I am on MyAccount.aspx via a Server.Transfer. I can
choose any page in my fancy nav menu, which are just hyperlinks, and
in the respective Page_Load I can get the userid from the session.
But only the once. That page will load fine and display user
information from the database etc. But if I choose another page from
the nav menu - even the same page, the Session variables have gone.
The Session.SessionID is the same but Session.Count is 0.
Can anyone shed any light on what may be happening behind the scenes -
I am perplexed.
Thanks
Kev