Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am redirecting by pages with Response.redirect in my application. I used the Session["username"]="user" in the first page. In second page I could not retrieve the session values.

Please help me.
Posted
Comments
F-ES Sitecore 28-Jul-15 5:05am    
The session survives a response.redirect so the problem is with how you are using it. Given you haven't provided any relevant detail or code we can't really advise further.
aarif moh shaikh 28-Jul-15 5:12am    
Show your code...
jyo.net 28-Jul-15 5:17am    
Have you written any code for that? can you share your code as well?
Kornfeld Eliyahu Peter 28-Jul-15 5:32am    
Maybe you redirect to a different site?
deepankarbhatnagar 28-Jul-15 5:59am    
PLease provide your code also.

1 solution

Hi Try like this,add this code in first form

C#
Session.Add("username", "Member 11531733");


and in second formget session value like this

C#
string usrname = Session["username"].ToString ();
 
Share this answer
 
v3

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