I have a button that will execute a stored procedure. After it’s been clicked, I want it disabled so that the user can’t click it multiple times. However, once it’s been clicked, I also want to run some C# on the server side through an onclick event. As of right now, all my code does is disable the button, but then it won’t run the server side stuff. Can this be achieved? Here’s my jQuery:
$("#btnGenerate").click(function () {
$(this).attr("disabled", true).val("Generating...");
});
You can make an ajax call to the server just after you hide/disable the button.
You can do something like this: