日期:2014-05-18 浏览次数:21219 次
protected void Button3_Click(object sender, EventArgs e) { test(sender); } protected void Button4_Click(object sender, EventArgs e) { test(sender); } protected void Button5_Click(object sender, EventArgs e) { test(sender); } private void test(object sender) { //这里怎么根据sender判断是点击button1进来的? Button btn = (Button)sender; Response.Write(btn.ID.ToString() + "被点击了"); }