ASP.NETAJAXを使用しているASP.NETアプリケーションがあります。ASP.NET AJAX Toolkitを使用して、ユーザーにダイアログを表示しています。ユーザーがダイアログで[はい]をクリックしたときに、そのイベントをコードビハインドで処理したいと思います。しかし、クリックイベントに到達していないことに気づきました。メインコードは次のとおりです。
<asp:Panel ID="dialogContinuePanel" runat="server" style="display:none;" DefaultButton="yesButton">
<div>Are you sure you want to continue?</div>
<div>
<asp:ImageButton ID="yesButton" runat="server" AlternateText="Yes" ImageUrl="/resources/yes.png" OnClick="yesButton_Click" />
<asp:ImageButton ID="noButton" runat="server" AlternateText="No" ImageUrl="/resources/no.png" />
</div>
</asp:Panel>
<asp:LinkButton ID="hiddenLinkButton" runat="server" Text="" />
<cc1:ModalPopupExtender ID="dialogErrorExtender" runat="server" OkControlID="yesButton"
TargetControlID="hiddenLinkButton" PopupControlID="dialogContinuePanel"
CancelControlID="noButton" />
背後にある私のコード:
protected void yesButton_Click(object sender, EventArgs e)
{
string argument = yesButton.CommandArgument;
// Do some processing and redirect the user
}
ModalPopupExtenderで使用されるボタンのクリックイベントを処理するにはどうすればよいですか?私は何が間違っているのですか?