更新面板异步回发时如何防止母版页回发
当更新面板内部发生异步回发时,MasterPage 也会发生另一个回发,而不仅仅是更新面板嵌入页面。
我想阻止此 MasterPage 回发。
这可能吗?
想想我有一个 MasterPage
和另一个页面 test.aspx 这是 MasterPage 的内容页面
我在 test.aspx 上有更新面板
当异步回发发生在这个 test.aspx 更新面板上时它也会加载 MasterPage Page_Load
我想防止这种情况(它不应该同时加载MasterPage Page_Load)
谢谢
When an asynchronous postback happened inside update panel, another postback happens also for MasterPage not only update panel embedded page .
I want to prevent this MasterPage postback .
is this possible ?
think like i have a MasterPage
and another page which is test.aspx which is content page of MasterPage
i have update panel at test.aspx
when asynchronous postback happens at this test.aspx update panel it also loads MasterPage Page_Load
i want to prevent this (it should not also load MasterPage Page_Load)
Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
ASP.NET 的 UpdatePanel(以及任何普通的 asp.net 页面)的回发也会回发母版页。
通常,为了正确处理回发,程序员会检查它并进行相应的编程:
所以,我的回答是,我不知道这是否可能(如果是,那肯定不容易),并且您的请求这不是一件正常的事情,程序员通过上面的简介来处理回发。
ASP.NET's UpdatePanel (as well as any normal asp.net page)'s postback does postback the master page as well.
Normally, to properly deal with postbacks, programmers check for it and program accordingly :
So, my answer here is that I don't know if it is possible (and if it is, it certainly isn't easy), and that your request is not a normal thing to do, and programmers handle PostBacks via the blurb above.