0

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?

2

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.