停止主页面清爽,而网页间导航?清爽、网页、主页

由网友(浮华人生彡)分享简介:我使用的母版页在我的ASP.net应用程序,在母版页,我把更新面板中的ContentPlaceHolder支持AJAX的子页面,问题是如何停止更新母版页控制,而网页间导航?I'm using Master Page in my ASP.net application, in the master page I put...

我使用的母版页在我的ASP.net应用程序,在母版页,我把更新面板中的ContentPlaceHolder支持AJAX的子页面,问题是如何停止更新母版页控制,而网页间导航?

I'm using Master Page in my ASP.net application, in the master page I put a ContentPlaceHolder in Update Panel to support AJAX in child pages, the question is how to stop Refreshing "master page controls" while navigating between pages?

有关页面之间的导航我试图用的的Response.Redirect 的 windows.location 的Java脚本没有成功,我应该使用frame或iframe,而不是母版页到停止刷新?

For navigation between pages I tried to use Response.Redirect, windows.location java script with no success, shall I use the Frames or IFrames instead of Master Pages to stop Refreshing?

任何建议提前解决这一问题将是非常美联社preciated,谢谢...

any suggestion to solve this issue will be highly appreciated, Thanks in advance...

推荐答案

如果你不想在网页页面之间切换时刷新,你将不必使用母版页什么好的解决办法。正如其他人在不同的词说,母版页就是这样被不同的页面一个共同的模板。之间的导航就像调用不同的页面,当然会重新加载整个页面,包括母版页的内容。

If you don't want the page to refresh when switching between "pages", you will not have any good solution using master page. As others have said in different words, the master page is just a common "template" that is used by different pages. The navigation between is just like calling different pages, and of course will reload the entire page, including the master page content.

我已经使用了与阿贾克斯sollution是 让每个网页作为用户 控制,并把他们都在 使用的UpdatePanel 可见=假。 那么对于与页导航,开关 能见度为用户控制 展示其网页的控制。

A sollution I have used with Ajax is to have each "page" as a user controls, and put them all in an UpdatePanel with visible="false". Then for navigation between "pages", switch visibility for the user controls to show the right "page" control.

另一种方法是使用iframe。

The alternative is to use iframe.

这些解决方案都使用母版。

Neither of these solutions use MasterPage.

母版概念旨在简化了通用的外观之前,阿贾克斯在ASP.NET中进行了介绍。阿贾克斯后走红,不刷新整个页面的需求已经比较普遍。

The MasterPage concept was designed to simplify a common look before Ajax was introduced in ASP.NET. After Ajax became popular, the demand for not refreshing the entire page has been more common.

阅读全文

相关推荐

最新文章