开发者

Avoid having the web-menu reload each time the user clicks a link?

I'm working on an ASP.net web application. Th开发者_StackOverflow中文版e application has a menu of link buttons at the top that appears exactly the same on every page.

My customer's representative pointed out to me that the menu "flashes" each time a link is clicked as the screen goes blank and the next page is loaded.

Right now, I'm using a master page to make the menu the same on every page. I am aware that frames are another way to accomplish this. If I were to put the menu in a frame, it would not reload every time the user clicks a link.

It is also possible, but not really feasible, to do this with client side scripting.

Do any of you fellow stackers know of a good way (not frames) to have a menu on every page in a web application that does not "flash" each time a new page is loaded?


"My customer's representative pointed out to me that the menu "flashes" each time a link is clicked as the screen goes blank and the next page is loaded."

You need to find a new customer representative that understands the basics of how the internet works.

Barring that, you can use Frames (which you don't want to use, as that's bad).

Or you could have one page that loads the menu, then all of the content on the page would then be instead loaded via AJAX calls. But you don't want to use that either, as that's silly.

So, yea, get a new customer representative. ;)


The ASP.NET way is to put the entire site body in an UpdatePanel, and make all navigation with postback controls.

Generally speaking, the only way to truly accomplish this (other than frames, which is a terrible idea) is to use AJAX to load the body of each page. UpdatePanels do this.

Your customer must be using IE8. Chrome and Firefox do a nice job of not making elements that remain unchanged between navigation stay on the screen.

Tell them to go to Amazon.com and click on a few links. Same thing (in IE anyway).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜