I want to execute a method from a server side. I am using ASP.NET WebForm. I am subscribed to a button click dynamically with jquery
$('input[value="execute"]').bind("click", myJavaScriptFunction);
I am not using this way
<asp:Button ID="btnSend" runat="server" CssClass="modalButton" Text="execute" OnClick="btnSend_Click" />
because I want to display a confirm dialog before the execution of the click event if OK button was pressed
var myJavaScriptFunction = function (e)
{
if (window.confirm('Are you sure?')) {
//HERE I WANT TO PERFORM A CALL TO btnSend_Click with null, null PARAMETERS
}
}
Can I do the same behavior in a different way?