Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Best Practice for Login Screen Using a Table form a Database

Reply
Thread Tools

Best Practice for Login Screen Using a Table form a Database

 
 
Carlos
Guest
Posts: n/a
 
      02-18-2005
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








 
Reply With Quote
 
 
 
 
=?Utf-8?B?VGFtcGEgLk5FVCBLb2Rlcg==?=
Guest
Posts: n/a
 
      02-18-2005
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

"Carlos" wrote:

> 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
>
>
>
>
>
>
>
>
>

 
Reply With Quote
 
 
 
 
Carlos
Guest
Posts: n/a
 
      02-18-2005
Thanks that doit !!

Carlos
"Tampa .NET Koder" <(E-Mail Removed)> wrote in
message news:(E-Mail Removed)...
> 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
>
> "Carlos" wrote:
>
>> 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
>>
>>
>>
>>
>>
>>
>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Database Database Database Database scott93727@gmail.com Computer Information 0 09-27-2012 02:43 AM
DataBase DataBase DataBase DataBase scott93727@gmail.com Computer Information 0 09-26-2012 09:40 AM
Login using NT login details from web form problems DavidADEW ASP .Net 2 09-01-2006 03:10 PM
Best practice for login screen using database Carlos ASP .Net Security 2 03-28-2006 07:23 PM
Remember when your piano teacher taught you, "Practice, practice,practice ...?" Wayne Wastier Windows 64bit 3 06-10-2005 08:29 PM



Advertisments