zoukankan      html  css  js  c++  java
  • 页面装载用户控件时的事件顺序

    在WebForm1页面上直接放置用户控件WebUserControl1时的事件顺序:
    WebUserControl1_Init
    WebForm1_Init
    Page_Load
    WebUserControl1_Load
    WebForm1_PreRender
    WebUserControl1_PreRender
    WebUserControl1_Unload
    WebForm1_Unload


    在WebForm1页面的OnInit方法中用代码Load用户控件WebUserControl1时的事件顺序:
    WebForm1_Init : OnInit
    WebForm1: Loading controls
    WebUserControl1_Init : OnInit
    WebForm1: added to Controls
    WebForm1: LoadViewState
    WebUserControl1: LoadViewState
    WebUserControl1: LoadPostData Begin
    WebUserControl1: LoadPostData End
    WebForm1_PageLoad: OnLoad after base's Onload.
    WebUserControl1_Load: after base's OnLoad
    iWebUserControl1: RaisePostDataChange
    WebForm1: OnPreRender
    WebUserControl1: OnPreRender
    WebForm1: SavedViewState
    WebUserControl1: SaveViewState

    在WebForm1页面的Page_Load方法中用代码Load用户控件WebUserControl1时的事件顺序:
    WebForm1_Init : OnInit
    WebForm1: LoadViewState
    WebForm1_PageLoad: OnLoad after base's Onload.
    WebForm1: Loading controls
    WebUserControl1_Init : OnInit
    WebUserControl1: LoadViewState
    WebForm1: added to Controls
    WebUserControl1_Load: after base's OnLoad
    WebUserControl1: LoadPostData Begin
    WebUserControl1: LoadPostData End
    iWebUserControl1: RaisePostDataChange
    WebForm1: OnPreRender
    WebUserControl1: OnPreRender
    WebForm1: SavedViewState
    WebUserControl1: SaveViewState

    在WebForm1页面的Button1_Click事件中用代码Load用户控件WebUserControl1时的事件顺序:
    WebForm1_Init
    Page_Load
    Button1_Click
    WebUserControl1_Init
    WebUserControl1_Load
    WebForm1_PreRender
    WebUserControl1_PreRender
    WebUserControl1_Unload
    WebForm1_Unload


    在WebForm1页面的Page_Load事件中用代码Load用户控件WebUserControl1,WebUserControl1又在Page_Load事件中用代码Load用户控件WebUserControl2时的事件顺序:
    WebForm1_Init
    Page_Load
    WebUserControl1_Init
    WebUserControl1_Load
    WebUserControl2_Init
    WebUserControl2_Load
    WebForm1_PreRender
    WebUserControl1_PreRender
    WebUserControl2_PreRender
    WebUserControl2_Unload
    WebUserControl1_Unload
    WebForm1_Unload

  • 相关阅读:
    php 基础------数组过滤
    js或者jq 使用cookie 时在谷歌浏览器不好使
    css3 -阻止元素成为鼠标事件目标 pointer-events
    CSS3-----transform 转换
    css3---过渡
    css3动画----animation
    移动端尺寸适配--媒体查询
    工作一年总结
    关于Jquery.Data()和HTML标签的data-*属性
    android shape
  • 原文地址:https://www.cnblogs.com/SALIN/p/1317948.html
Copyright © 2011-2022 走看看