944,098 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Marked Solved
  • Views: 439
  • ASP.NET RSS
Nov 2nd, 2009
0

session varible from 1 page to another

Expand Post »
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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
nikichu is offline Offline
14 posts
since Jun 2009
Nov 2nd, 2009
0
Re: session varible from 1 page to another
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();
}
Reputation Points: 9
Solved Threads: 13
Junior Poster in Training
chandru7 is offline Offline
72 posts
since Sep 2009
Nov 2nd, 2009
0
Re: session varible from 1 page to another
Try with below sample code:
ASP.NET Syntax (Toggle Plain Text)
  1. if(Session["User"]!=null)
  2. lblName.Text=Session["User"].ToString();
Reputation Points: 26
Solved Threads: 44
Posting Whiz in Training
mail2saion is offline Offline
247 posts
since Apr 2009

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: vb.net: How to check or uncheck all chekboxes by clicking only one checkbox.
Next Thread in ASP.NET Forum Timeline: open the pdf and doc files as readonly





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC