ユーザーが自分のアカウントを削除したいときに確認ボックスを作成したいのですが、そのために彼は自分のパスワードを(テキストボックスに)挿入する必要があります。しかし、ポストバックイベントをキャッチし、コードビハインドでメソッドを実行する方法がわかりません...
これは私のコードです:
私のダイアログボックス:
<div id="dialog" title="Confirmation Required">
Are you sure about this?
Password:<asp:TextBox id="remove_password" TextMode="Password" runat="server"></asp:TextBox>
</div>
ダイアログを呼び出す私のボタン:
<asp:LinkButton ID="lb_remove" Text="Delete Account" runat="server" OnClientClick="javascript: $('#dialog').dialog('open'); return false;" ClientIDMode="Static" />
私のスクリプト:
$().ready(function() {
$("#dialog").dialog({
autoOpen: false,
modal: true,
bgiframe: true,
width: 400,
height: 300,
buttons: {
'Delete': function() {
//do something
//what to put here???
//i need to pass my textbox value or in
//codebehind i do findcontrol and will work?
//
},
'Cancel': function() {
$(this).dialog('close');
}
}
})
});
誰か助けてもらえますか?ありがとう。