Home > DeveloperSection > Forums > How to call server-side function from client-side in ASP.NET?
marcel ethan
marcel ethan

Total Post:105

Points:735
Posted on    August-23-2014 8:26 AM

 ASP.Net ASP.Net 
Ratings:


 1 Reply(s)
 622  View(s)
Rate this:

I have a web page having asp.net button control and textbox. I want a confirm message box, when someone changes the content of textbox and click on button. If user click on yes then event of button should fire other wise nothing should happen. All I want is to implement AJAX call back, but it is not working with ASP.NET button control.



Sumit Kesarwani

Total Post:378

Points:2694
Posted on    August-23-2014 8:41 AM

Hi Marcel, 

Just add the following code to your aspx code

<asp:Button ID="btn1" OnClientClick="return confirm('sure?');" runat="server" Text="Button" />

Hope this will solve your problem.


Don't want to miss updates? Please click the below button!

Follow MindStick