Click here to Skip to main content
15,907,913 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am using master page in which menu is generating dynamically according to user roll in code. same menu is using for all application to particular user up to log out. So instead of recreating i need same menu for all application. Menu in string builder which is very large size. session or data cache is better and less memory consuming in my situation and why?
I want to improve performance of master page.

Thanks
Posted

Hi there..

Both are useful. It depends upon your requirement that what you require exactly. Session is used to track the user information which is probably impossible with cache.. You can store even the database also in your session whenever it requires..
Just visit this link[^] to clear your doubts..

All the best..
 
Share this answer
 
Use Cache(In your question you said you want to show the same menu in your application). After login store the data(based on user role) in Cache & use it for menu.
ASP.NET Caching Dependencies[^]
 
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