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":
.....
}
}
{
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":
.....
}
}
///num为1||2||3
public void test(string num){}
那在这个函数里如何来实现呢?