How to call server-side function from client-side in ASP.NET?

Total Post:104

Points:728

 1223  View(s)
Ratings:
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.

  1. Re: How to call server-side function from client-side in ASP.NET?

    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.

Answer

Please check, If you want to make this post sponsored

You are not a Sponsored Member. Click Here to Subscribe the Membership.