这是我的问题分三步:
1 - ConfirmButtonExtender btn0被按下
2 - 弹出窗口打开,里面有 2 个按钮(确认和取消)
3 - 按下确认按钮,然后调用 btn0_Click
我希望在第一次按下 btn0 时调用它
.aspx
<asp:Button runat="server" ID="btn0" Text="OK" OnClick="btn0_Click" />
<cc1:ConfirmButtonExtender ID="ConfirmButtonExtender_GetHour"
runat="server" TargetControlID="btn0" OnClientCancel=""
DisplayModalPopupID="ModalPopupExtender_GetHour"
ConfirmOnFormSubmit="true"
ConfirmText="yo?" />
<br />
<cc1:ModalPopupExtender ID="ModalPopupExtender_GetHour"
runat="server" PopupControlID="PNL_getHour"
TargetControlID="btn0" OkControlID="ButtonOk_GetHour"
CancelControlID="ButtonCancel_GetHour"
Enabled="True"> </cc1:ModalPopupExtender>
<asp:Panel ID="PNL_getHour" runat="server">
POPUP WITH A BUTTON AND A CANCELBUTTON
</asp:Panel>
。CS
protected void btn0_Click(object sender, EventArgs e)
{
//I WANT THIS METHOD TO WORK WHEN BTN0 IS PRESSED
//AND NOT WHEN THE POPUP'S CONFIRM BUTTON IS PRESSED
}