按照什么顺序asp.net母版页执行 [英] In what order asp.net master pages execute

查看:106
本文介绍了按照什么顺序asp.net母版页执行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为我的项目中使用母版页。我想知道在这两个母版页和网页的页面加载也执行有关脚本命令


解决方案

  1. 母版页子控件初始化:包含在母版页中的所有服务器控件第一次初始化

  2. 内容页子控件初始化:包含的内容页面的所有服务器控件的初始化

  3. 主页面初始化:母版页本身初始化

  4. 内容页面初始化:内容页面初始化

  5. 内容页面加载:页面内容被加载(这是Page_Load事件随后Page_LoadComplete事件)

  6. 主网页加载:主页面加载(这也是Page_Load事件)

  7. 母版页子控件加载:母版页上的服务器控件加载到页面

  8. 内容页子控件加载:内容页面上的服务器控件加载到页面

<一个href=\"http://it.toolbox.com/blogs/coding-dotnet/events-in-master-page-content-pages-16262\">http://it.toolbox.com/blogs/coding-dotnet/events-in-master-page-content-pages-16262

I m using master page in my project. I want to know the order in which the page loads of both master page and web page executes also about the scripts

解决方案

  1. Master page child controls initialization: All server controls contained within the master page are first initialized.
  2. Content page child controls initialization: All server controls contained in the content page are initialized.
  3. Master page initialization: The master page itself is initialized.
  4. Content page initialization: The content page is initialized.
  5. Content page load: The content page is loaded (this is the Page_Load event followed by the Page_LoadComplete event).
  6. Master page load: The master page is loaded (this is also the Page_Load event).
  7. Master page child controls load: The server controls on the master page are loaded onto the page.
  8. Content page child controls load: The server controls on the content page are loaded onto the page.

http://it.toolbox.com/blogs/coding-dotnet/events-in-master-page-content-pages-16262

这篇关于按照什么顺序asp.net母版页执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆