Chapter 25B. Using jQuery for Ajax in MVC
These are the Ajax methods that jQuery provides:
$.ajax — This method performs an Ajax request. All of the other methods in this list are shortcuts that use this method.
$.get — This method loads HTML using an HTTP GET request.
$.getJSON — This method loads JSON-encoded data using an HTTP GET request.
.load — This method loads HTML into the specified element.
$.post — This method loads HTML using an HTTP POST request.
The simplest way to fetch data asynchronously from the server is to use the
.load method. These are the parameters of the
url — This is a string that contains the URL to which the request is sent. This is the only required parameter.
data — This is a string that contains any data that needs to be sent to the URL.
complete — This is the function that is called when the request completes.
.load method uses a
GET method to fetch data from the server, ...