aspx_beginners thread: session
Message #1 by "Aaron Fleming" <aaronf@w...> on Tue, 18 Jun 2002 17:22:31 -0400
|
|
What would be the asp.net equivilant of selecting a userid from a db and
putting it in session?
Thanks!
Aaron
Message #2 by Aneesh P U <aneeshpu@y...> on Tue, 18 Jun 2002 23:51:46 -0700 (PDT)
|
|
This should work....
String userName="aaronF";
Session["userName"] = userName;
Session.Add("userName",userName);
--- Aaron Fleming <aaronf@w...> wrote:
> What would be the asp.net equivilant of selecting a
> userid from a db and
> putting it in session?
>
> Thanks!
> Aaron
>
>
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
Message #3 by Aneesh P U <aneeshpu@y...> on Tue, 18 Jun 2002 23:53:53 -0700 (PDT)
|
|
Sorry u need to use only one of the two methods
that is either
Session["userName"] = userName;
or
Session.Add("userName",userName);
--- Aaron Fleming <aaronf@w...> wrote:
> What would be the asp.net equivilant of selecting a
> userid from a db and
> putting it in session?
>
> Thanks!
> Aaron
>
>
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
Message #4 by "Aaron Fleming" <aaronf@w...> on Wed, 19 Jun 2002 09:12:21 -0400
|
|
Easy enough! :)
Thanks!
Aaron
-----Original Message-----
From: Aneesh P U [mailto:aneeshpu@y...]
Sent: Wednesday, June 19, 2002 2:52 AM
To: aspx_beginners
Subject: [aspx_beginners] Re: session
This should work....
String userName="aaronF";
Session["userName"] = userName; Session.Add("userName",userName);
--- Aaron Fleming <aaronf@w...> wrote:
> What would be the asp.net equivilant of selecting a
> userid from a db and
> putting it in session?
>
> Thanks!
> Aaron
>
>
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
|