I am developing an ASP.Net application in which I am giving client side alert to the user with OK and Cancel buttons. Can I call a server side function from the click of this button?
For e.g. I have to give user alert "Do you want to save record" with Yes/No button. On Yes button click it should go to the server and save the record. Can I call some server side function from the Yes button click?
Any help in this regard will be highly appreciated. Thanks in advance.
I would create a button control, say Button1.
then, in script:if (confirm("Do you want to save record")) Button1.click();Then handle the event in Button1_Click() on the Server.