session varible from 1 page to another

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Jun 2009
Posts: 14
Reputation: nikichu is an unknown quantity at this point 
Solved Threads: 0
nikichu nikichu is offline Offline
Newbie Poster

session varible from 1 page to another

 
0
  #1
Nov 2nd, 2009
Hi alll......


i am trying out a login form where in which i have multiple users... i have redirect each user to differnt pages.....

....but im stuck in the middle....... please help me out.....

<code>

page1

session["user"]=txtuser.text

page2

welcome text(A label which is used to specify the current user)

Thank u all in advance:


Nikichu
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 58
Reputation: chandru7 is an unknown quantity at this point 
Solved Threads: 13
chandru7 chandru7 is offline Offline
Junior Poster in Training
 
0
  #2
Nov 2nd, 2009
Just collect the session value and assign it label,the user redirection is based on any group?

if(session["user"].ToString() != "")
{
label lblname=session["user"].Tostriing();
}
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 225
Reputation: mail2saion is an unknown quantity at this point 
Solved Threads: 34
mail2saion's Avatar
mail2saion mail2saion is offline Offline
Posting Whiz in Training
 
0
  #3
Nov 2nd, 2009
Try with below sample code:
  1. if(Session["User"]!=null)
  2. lblName.Text=Session["User"].ToString();
MARK AS SOLVED if its help you.

REGARDS
MCTS - Shawpnendu bikash maloroy
http://shawpnendu.blogspot.com
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for ASP.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC