gpt4 book ai didi

c# - 是否首先调用母版页?

转载 作者:太空狗 更新时间:2023-10-29 18:02:03 25 4
gpt4 key购买 nike

我假设这是真的,但想提出这个问题。母版页是在 ASP.NET 中首先执行,还是正在检索的页面?

我问是因为我想在母版页中完成一些处理,其结果被加载到一个静态对象中,然后可以被调用的页面使用(例如用户数据)

最佳答案

抱歉只是引用,但我不知道要添加什么:

Individual ASP.NET server controls have their own life cycle that is similar to the page life cycle. For example, a control's Init and Load events occur during the corresponding page events.

Although both Init and Load recursively occur on each control, they happen in reverse order. The Init event (and also the Unload event) for each child control occur before the corresponding event is raised for its container (bottom-up). However the Load event for a container occurs before the Load events for its child controls (top-down). Master pages behave like child controls on a page: the master page Init event occurs before the page Init and Load events, and the master page Load event occurs after the page Init and Load events.

http://msdn.microsoft.com/en-us/library/ms178472.aspx

enter image description here

关于c# - 是否首先调用母版页?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10505350/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com