楼主说的什么啊?
Button1_Click的访问修饰符吗?

解决方案 »

  1.   

    把代码:
    Session["a"]="aaa";
    Response.Redirect("WebForm5.aspx");
    写到一个方法中去,在Button1及要实现这个功能的时候调用它.
      

  2.   

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

    /// <summary>
    /// 设计器支持所需的方法 - 不要使用代码编辑器修改
    /// 此方法的内容。
    /// </summary>
    private void InitializeComponent()
    {    
    this.Button1.Click += new System.EventHandler(this.Button1_Click);
    this.Load += new System.EventHandler(this.Page_Load); }
    #endregion