有沒有定義 
以Button1為例 this.Button1.Click += new System.EventHandler(this.Button1_Click); Button1_Click 就是你處理事件的函數

解决方案 »

  1.   

    你没有编辑吧!或在.aspx文件没有绑定代码!
    <%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm3.aspx.vb" Inherits="ManagerXP.WebForm3"%>
      

  2.   


    Button1.Click += new System.EventHandler(this.Button1_Click); 
    方到OnInit中
      

  3.   

    在该函数前增加了public就可以了
      

  4.   

    同意楼上,在cs文件的类中加上:private void InitializeComponent()
    {    
    this.Button1.Click += new System.EventHandler(this.Button1_Click);
    this.Load += new System.EventHandler(this.Page_Load); }