private void InitializeComponent()
{    
this.Button1.Click += new System.EventHandler(this.Button_Click);
         this.Button2.Click += new System.EventHandler(this.Button_Click);
         this.Button3.Click += new System.EventHandler(this.Button_Click); this.Load += new System.EventHandler(this.Page_Load);}
private void Button_Click(object sender, System.EventArgs e)
{
   Button tmpBtn = (Button)sender;
   switch(tmpBtn.Text)
   {
     case "Button1":
     .....
   }
}