[英]Response.Redirect and masterpage
I have a master page in my ASP.Net application. 我的ASP.Net应用程序中有一个母版页。 I have a Menu inside a master page which redirects to its own content pages.
我在母版页中有一个菜单,该菜单可重定向到其自己的内容页。 All the pages are derived from the same masterpage.
所有页面均来自同一母版页。 each time a redirect happens from One page to another the Master Page is loaded.
每次从一个页面重定向到另一个页面时,都会加载母版页。 Is there a way that we can avoid MasterPage to reload after redirection happens.
有没有一种方法可以避免重定向发生后重新加载MasterPage。
To be precise I want to know can we prevent Masterpage from reloading on Response.redirect. 确切地说,我想知道我们是否可以防止在响应.redirect上重新加载母版页。
A response Redirect is a page refresh so the master page has to reload. 的响应重定向页面刷新,因此母版页已重新加载。
The way around it is to use an AJAX call and refresh only your content areas. 解决方法是使用AJAX调用并仅刷新您的内容区域。
Is there a way that we can avoid MasterPage to reload after redirection happens?
有没有一种方法可以避免重定向发生后重新加载MasterPage?
No! 没有! Please read " Run-time Behavior of Master Pages " from the MSDN doc.
请从MSDN文档中阅读“ 母版页的运行时行为 ”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.