473,405 Members | 2,310 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

UpdatePanel and navigation

Hi,

this must have been asked a thousand times, but for some reason I
couldn't find anything on this..

I have an ASP.NET 2 website with a masterpage, which contains some
navigation links (partially created from a database at runtime,
partially static). What I want to achieve is that when the user clicks a
link, the ContentTemplate gets reloaded to display the new content but
the navigation links should not be re-created (i.e. avoid flicker).

Sounded like an updatepanel to me, but if the updatepanel spans around
the navigation, the navigation gets refreshed obviously; and if the
updatepanel only spans around the ContentTemplate, then the navigation
links are outside the updatepanel, causing a full post-back. Triggers
didn't help either..

There must be an easy solution and I'm just blind.. can anyone shed some
light on this?

Cheers,

Roland
Oct 22 '07 #1
6 1779
"Roland Dick" <br*****@web.dewrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
this must have been asked a thousand times, but for some reason I couldn't
find anything on this..

I have an ASP.NET 2 website with a masterpage, which contains some
navigation links (partially created from a database at runtime, partially
static). What I want to achieve is that when the user clicks a link, the
ContentTemplate gets reloaded to display the new content but the
navigation links should not be re-created (i.e. avoid flicker).

Sounded like an updatepanel to me, but if the updatepanel spans around the
navigation, the navigation gets refreshed obviously; and if the
updatepanel only spans around the ContentTemplate, then the navigation
links are outside the updatepanel, causing a full post-back. Triggers
didn't help either..

There must be an easy solution and I'm just blind.. can anyone shed some
light on this?
Sounds like you're confusing MasterPages with framesets...

A MasterPage is nothing more than a particular kind of UserControl. When you
open a content page, it simply uses the MasterPage to provide common look
and feel. Moving from one content page to another content page is no
different from moving from a "normal" aspx page to another "normal" aspx
page...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Oct 22 '07 #2
Hi Mark,

Mark Rae [MVP] schrieb:
Sounds like you're confusing MasterPages with framesets...
Thanks for your reply, much appreciated. Yes, I know the MasterPages
concept. I'm somewhat new to the AJAX Control Toolkit though and thought
the UpdatePanel would help me solve this problem. I think the situation
would be the same without MasterPages and the navigation being static in
each page.

What would be a proper solution to avoid re-loading the navigation then
(as obviously framesets are.. let's say outdated :) )

Cheers,

Roland
Oct 22 '07 #3
"Roland Dick" <br*****@web.dewrote in message
news:eG****************@TK2MSFTNGP04.phx.gbl...
I think the situation would be the same without MasterPages and the
navigation being static in each page.
Yes it would - navigation is navigation i.e. moving from one page to another
page. Callbacks (i.e. AJAX in this case) don't involve navigation...
What would be a proper solution to avoid re-loading the navigation then
(as obviously framesets are.. let's say outdated :) )
I'm slightly confused as to what you're trying to achieve here... When you
move from page1.aspx to page2.aspx, page2.aspx is going to have to load from
scratch...

If you're trying to simulate the same sort of functionality as framesets,
this might work if all your pages are .htm - you could open them with
System.IO, strip off the <html>, <headand <bodytags and squirt what's
left into a <div>...

Alternately, maybe an <iframewould work.

Sounds like you're making life difficult for yourself with no discernible
(IMO!) benefit...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Oct 22 '07 #4
Hi Mark,

Mark Rae [MVP] schrieb:
Sounds like you're making life difficult for yourself with no
discernible (IMO!) benefit...
Yeah, that might be true. Well, the main benefit would be that clicking
a link in the navigation wouldn't cause DB queries to run (which fill
some of the navigation bar).
But I think I could as well cache the data.

Thanks for your help!

Roland
Oct 22 '07 #5
"Roland Dick" <br*****@web.dewrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
>Sounds like you're making life difficult for yourself with no discernible
(IMO!) benefit...

Yeah, that might be true. Well, the main benefit would be that clicking a
link in the navigation wouldn't cause DB queries to run (which fill some
of the navigation bar).
But I think I could as well cache the data.
That would definitely be the way to go if your navigation is at least static
per session...

Presumably, the links are different per (type of) user, otherwise you'd just
hardcode them, right...?
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Oct 22 '07 #6
Hi Mark,

Mark Rae [MVP] schrieb:
Presumably, the links are different per (type of) user, otherwise you'd
just hardcode them, right...?
No, in that case I would use a LoginView control and still hardcode the
links in the according rolegrouptemplate; the links are from a database
where articles are stored, and for example the 10 most popular articles
should be displayed in the navigation under a "products" collapsible
panel (together with a static "All products" link).

The other problem is that the links cause not just a postback but a
reload of the page, making the collapsible panels loose their state. But
that is a different story...
Roland
Oct 24 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: marss | last post by:
Hello, I have a question concerning UpdatePanel. For example, I have two linkbuttons at the UpdatePanel. I want the Button1 linkbutton to update controls within panel (the TextBox1 control in...
2
by: brett | last post by:
I have an AJAX updatepanel in an aspx page. Inside the updatepanel is a placeholder control, which loads various ascx files. This all works fine. One of the ascx files also has an updatepanel in...
1
by: podpi | last post by:
Hello I'm having a bit of a proooblem. I have a gridview which has a checkbox as one of the templatecolumn's. When it is checked, it hides a textbox containing a DateTime templatefield...
4
by: Rob Meade | last post by:
Hi all, Ok - this might sound kinda stupid - but I cant see how to do it... I've got an update panel which contains, on one horizontal line, a drop down list, then an image, then another drop...
2
by: ChrisCicc | last post by:
Hi All, I got a real doozy here. I have read hundreds upon hundreds of forum posts and found numerous others who have replicated this problem, but have yet to find a solution. Through testing I have...
3
by: JacekDr | last post by:
Hello, I've got the following problem: I want to add and remove dynamically controls to UpdatePanel. In my user control I have a button, but when I click it I get AsyncPostback and Event for...
1
by: abellix | last post by:
An updatepanel contains a datagrid, this datagrid has columns generated by code-behind: some columns should have async postback, others should have sync postback. Here a sample to reproduce the...
0
by: Jeff | last post by:
hey asp.net 3.5 I have 2 UpdatePanels in my webpage. This webpage has a GridView, which one of its column is a templatefield which again contain a UpdatePanel and a button... The other...
13
by: SAL | last post by:
Hello, I'm trying to include a popup in the ItemTemplate of a gridview row. The ItemTemplate for the field contains a textbox and when the user clicks in the textbox I want a popup panel to show...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.