我有一个弹出的ajaxtoolkit看起来像这样:
<ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" runat="server"
TargetControlID="Button4"
BehaviorID="popup1"
PopupControlID="Panel1"
DropShadow="true"
CancelControlID="Button3"
OnOkScript="OkButtonClick"
BackgroundCssClass="BackgroundStyle" />
如何让它在c#中的btnReject_click中执行?
protected void btnReject_click(object sender, EventArgs e)
{
//code here
}
起初我就是这样做的。
tb.Text = "Reject";
tb.CssClass = "btn btn-default";
tb.OnClientClick = "javascript:$find('popup1').show();";
tb.UseSubmitBehavior = false;
tb.CausesValidation = false;
tb.Click += new EventHandler(btnReject_click);
但我发现它会首先执行弹出。所以,目前我正在寻找一种方法,让它在点击按钮后执行