Best Practice for Login Screen Using a Table form a Database

  • Thread starter Thread starter Carlos
  • Start date Start date
C

Carlos

I have an c# as.net app that check if the user exist in a USERS table, that
part is ok but now I need to pass the user ID no the next page beacuse I
need to do some databse queries with that user ID, I'm passing the values as
:
Context.Items.Add("UserID",TempUserID);
Context.Items.Add("VerifyString","OkPEV");
Server.Transfer("timesheet.aspx", true);

Now my problem is that in the timesheet.aspx page ths UserID come fine the
first time, but if I do refeesh or add a record to my timesheet databse I
loose the UseID.

So is it any way to keep that variable on memmory while the session is open
?

Thanks
 
Storing items in the Session object should do it

Session("UserID") = TempUserID
....

That holds the variable as long as that current browser window is open
 
Thanks that doit !!

Carlos
Tampa .NET Koder said:
Storing items in the Session object should do it

Session("UserID") = TempUserID
...

That holds the variable as long as that current browser window is open
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top