Click here to Skip to main content
15,894,017 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have an application with several controllers and views. As a user navigates through various vies and controller i need to record the navigation history for back tracking purpose. for this purpose i have decided to use a stack for pushing and popping the navigation history as i move from controller to controller. the problem is after trying a lot of stuff like

static class with static properties,
HttpContext.Applicaion property,
HttpContext.Cache property,
and also the HttpContext.Current.Session property
but each time i move from controller to controller these properties are nullified and a new instance is created in each case.(for going from controller to controller I am using RedirectToAction() method)

What i need is an stack that is available throughout the application and i can use it from different controllers to get or set the navigation info.
Posted
Comments
Zoltán Zörgő 6-Jan-13 6:10am    
Any progress?

1 solution

This is what session state is made for. The HttpContext.Current.Session is null only if session handling is disabled, or when accessed from constructor.
 
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