【发布时间】:2011-03-09 04:13:13
【问题描述】:
void 按钮接收到true后有一个确认框,期望运行另一个按钮的点击事件 但是,Void2_Button_Click 没有运行,哪里出错了?
protected void Void2_Button_Click(object sender, EventArgs e)
{
// do something
}
Void_Button.Attributes.Add("onclick", "var agree=confirm('Confirm to void?'); if (agree){document.getElementById('Void2_Button').click();}");
这个问题还没解决,谁能回答?
【问题讨论】:
-
为什么要以编程方式运行另一个按钮的点击事件?让两个按钮在后面的代码中触发相同的事件处理程序不是更好吗?