单击菜单时主页面后退? [英] Master Page Post Back When Clicking The Menu?
本文介绍了单击菜单时主页面后退?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨!
我在ASP.Net(C#)有一个项目。我有一个带有菜单的母版页。当我点击菜单项并重定向到其他页面时,发生了主页面的PostBack。
如何解决这个问题。
谢谢。
Hi !
I have a project in ASP.Net(C#). I have a Master Page with a Menu. When I click on the Menu Item and Redirect to other page , happened PostBack for Master Page .
How to solve this problem .
Thanks .
推荐答案
这就是母版页的工作方式。主页面作为内容页面的包装器注入,但master + content的组合作为单个页面执行,因此每次请求内容页面时,母版页和子页面都具有整个页面生命周期,包括回发事件。
Master \ children页面不像主机只加载一次并保持静态而只有内容页面发生变化的帧。
That's how master pages work. The master page is injected as a wrapper around the content page, but the combination of master+content is executed as a single page so both master page and child page have the full page lifecycle, including postback events, every time a content page is requested.
Master\child pages are not like frames where the master only loads once and remains static while only the content page changes.
这篇关于单击菜单时主页面后退?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文