Click here to Skip to main content
15,903,033 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Session value becomes null after redirecting to different page
How can i solve this problem ???
Posted
Comments
Rockstar_ 17-Sep-12 3:44am    
check whether you are assigning properly or not , otherwise use querystring to pass value from one page to another page.
AmitGajjar 17-Sep-12 3:58am    
Are you cleaning session anywhere in code ?

1 solution

This will not happen. You might be clearing the session value in page load event.

Also while reading the session value dont forget to cast the object.

For Ex:

while assinging session if u give

Session["Region"]= "Asia";

While reading cast it to ToString();

string Val = Session["Region"].ToString();
 
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