this.Load += new System.EventHandler(this.Page_Load);
这句没有吗?

解决方案 »

  1.   

    private void Page_Load(object sender, System.EventArgs e)
    {
    // 在此处放置用户代码以初始化页面
    if(!Page.IsPostBack)
    {
    InitialTreebyFormat();
    }
    }
    是系统自动加的啊!!
      

  2.   

    在if(!Page.IsPostBack)添加断点就清楚怎么回事了
    如果if(!Page.IsPostBack)不执行的应该是缺少this.Load += new System.EventHandler(this.Page_Load);
      

  3.   

    确实是不执行,在那里添加this.Load += new System.EventHandler(this.Page_Load);
    ??
      

  4.   


    #region Web Form Designer generated code
    override protected void OnInit(EventArgs e)
    {
    //
    // CODEGEN:该调用是 ASP.NET Web 窗体设计器所必需的。
    //
    InitializeComponent();
    base.OnInit(e);
    }

    /// <summary>
    /// 设计器支持所需的方法 - 不要使用代码编辑器修改
    /// 此方法的内容。
    /// </summary>
    private void InitializeComponent()
    {    

    this.Load += new System.EventHandler(this.Page_Load); }
    #endregion
      

  5.   

    这个函数是给窗体的加载事件添加事件处理程序的,具体可查阅msdn的事件委托
      

  6.   

    把你的page_load里的代码贴一下吧,还有你调用的那个函数
    不应该有问题啊