Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 25th, 2007, 11:13 AM
Registered User
Join Date: Dec 2006
Location: Los Angeles, CA, USA.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.

Another approach was to have two iframes and having header on top and content on bottom. I had the menu fire javascripts in order to load the pages on bottom iframe. But it had significant drawbacks. The URL on top of browser is always constant (the url of header). Secondly, there were lots of issues in terms of authentication, disconnected communication etc.

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

  #2 (permalink)  
Old April 25th, 2007, 01:42 PM
Friend of Wrox
Join Date: Feb 2006
Location: , , USA.
Posts: 116
Thanks: 0
Thanked 0 Times in 0 Posts

I don't see how it's possible for the menu to bind to it's data source when you placed the DataBind() method call inside of an If Not IsPostBack conditional.

That probably means it is binding somewhere else. Is it hooked to a SiteMapDataSource control? If so I think that will automatically bind every time unless you employ caching.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 7: Navigation - Menu Control VeganMan BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 12 April 10th, 2008 08:28 AM
Menu Navigation behind Control jwiedmier BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 2 March 19th, 2008 10:54 AM
Easiest/Recommended Navigation Menu Control/Soluti andhuang ASP.NET 2.0 Professional 0 February 7th, 2007 04:13 PM
How do I get a menu/navigation look like this? R/O LuxeGirl Classic ASP Basics 4 January 22nd, 2005 08:04 PM
pop up menu on navigation bar joshil Dreamweaver (all versions) 0 May 16th, 2004 07:53 AM

All times are GMT -4. The time now is 04:22 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.