function JQueryConfirm(Message, IDContorlToPostBackTo) {
// *************************************************************************************************************************************************************
// USAGE: asp:Button ID="Button1" runat="server" Text="Button" OnClientClick = "JQueryConfirm('This is a question you need to answer','Button1');return false;"
// *************************************************************************************************************************************************************
//Create the dialog div...
$('body').append("<div id='dvJQC' style='display:none'>" + Message + "</div>");
// Define the Dialog and its properties.
$('#dvJQC').dialog({
resizable: false,
modal: true,
title: "Modal",
show: "slide",
height: 250,
width: 400,
buttons: {
"Yes": function() {
$(this).dialog('close');
__doPostBack(IDContorlToPostBackTo, '');
},
"No": function() {
$(this).dialog('close');
}
}
}).prev().find('.ui-dialog-titlebar-close').hide(); //dialog hide the close icon.;
} //End funciton
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
'Keep in mind we can capture and run the __EventTarget this way...
Dim
s As String = Me.Request("__EVENTTARGET") & ""
If
s.ToUpper = "StevesSubToRun" Then
StevesSubToRun()
End
If
End Sub