刷新页面加载流程

1.页面首次加载的运行 公共成员,及首页加载事件

2.只有 html标签 页面刷新 只运行js部分 服务端不执行

3.是客户端有服务器控件导致的

页面刷新 会导致后台页面加载事件重新执行

可能是 这个按钮有页面提交功能,将客户端的数据传送到后台进行操作

服务器控件:提交数据的功能

4.手动刷新 页面加载事件执行

 

Cs:

    public partial class html5 : System.Web.UI.Page
    {
        public int thistype;
        public static int count = 0;
        protected void Page_Load(object sender, EventArgs e)
        {
            thistype = count++;
        }
    }

页面加载顺序:客户端标签加载-》后台 成员及页面初始事件--js部分--》事件触发--》后台事件

 

惊奇地发现 后台成员加载 特殊情况:

 

 public int thistype =0;

 

 public static int count = 0;

 

先执行  static int count = 0 这个静态变量 而且是首次加载的时候给赋值,其他时候值不改变

 

 

 

 

 

posted @ 2012-04-01 13:41  呓语  阅读(528)  评论(0编辑  收藏  举报
welcome to this garden! --Chenly