How to avoid reloading of navigation menu every ti
I am using a database driven menu for navigating to different pages. Is there a way to avoid reloading of the menu every time a page is called. I tried different method but all of them makes call to database everytime
My first try was as a usercontrol. Inside the usercontrol I had the menu. I had the menu databind inside a !(IsPostBack) condition, but still it kept binding itself. I tried binding it on onnit event too. My second attempt was on masterpages. I had the menu in masterpage and it kept binding the menu everytime a page is requested or a post back is made.The third try was using an interface which I extended like this on the partial class definition
public partial class Order_Query_Report : System.Web.UI.Page, CustomParent.IPageToIncludeHeaderFooter
The header was coming through that interface which internally contains a usercontrol (which in turn contains the menu).
None of them helped me to achieve what I was looking for.
It will be great if someone can advice me how to achieve a header menu which doesn't rebind everytime.
I tried ajax , but that also didn't help.Every time there' s a redirect, the menu binds itself