Click here to Skip to main content
15,891,473 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
how to remember the entered username to be displayed to the next page label using sessions in c#
Posted
Comments
Dholakiya Ankit 4-Oct-13 6:03am    
Start from here Click here
Faisalabadians 4-Oct-13 10:07am    
if you want to show data to just next page, there are several objects used to shared data between asp.net pages like query string, cookies, session state, application state etc. why you are just going to use sessions? and if you dont want data for further then why you storing it in sessions?

Well,i can see you have no idea how to proceed with the Session. I strongly recommend you to refer this link: Exploring Session in ASP.NET[^]

You should take a look at how session works,advantages and disadvantages of it.

Regards..
 
Share this answer
 
 
Share this answer
 
Session["username"]=txtUsername.Text; //Creating Session

lblUsername.Text=Session["username"].ToString(); //Retrieving Session value
 
Share this answer
 
Session["username"]=txtUsername.Text; //Creating Session





lblUsername.Text=Session["username"].ToString(); //Retrieving Session value
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900