I wrote some basic Javascript functions and would like to know how to enable asynchronous callbacks in a C # 4.0 / ASP.net project using this JS code.
For example, I have a script that increments a number when clicked. When pressed again, the number decreases. I basically load the number from the database, then hide one <span> and show the other with the corresponding reduced number on click. This is not complicated javascript; his simple example. Now, when I click the button, I want to send this increase / decrease request to the server in order to update the database number.
I understand that I can accomplish something similar to this example using the AJAX Control Toolkit toggle button. However, I want to know how to use my OWN javascript to create AJAX functionality.
How to do this with C # and my custom Javascript code?
I am not against using the ASP.NET AJAX library, I just do not want to use a ready-made inline control. I want to learn the process of creating my own AJAX functionality. I would suggest that I have to use asp:UpdatePanel , but I don't know how to call C # functions from the client side.
My javascript is not jQuery, in fact I don't want to have anything to do with jQuery until I learn more about javascript and this process.
javascript c #
Morgan
source share