JQuery AJAX with ASP.Net MVC
Introduction
The JQuery has following methods that can be used to perform Ajax requests:
- ajax() - Load a remote page using an HTTP request. This is jQuery's low-level AJAX implementation.
- load() - Load HTML from a remote file and inject it into the DOM.
- get() - Load a remote page using an HTTP GET request.
- getJSON() - Load JSON data using an HTTP GET request.
- getScript() - Loads, and executes, a local JavaScript file using an HTTP GET request.
- post() - Loads HTML by performing an HTTP post request.
Background
In this article, I will show you how to build a Jquery AJAX enabled ASP.NET MVC application. To create a new MVC project, see ASP.net MVC application structure. I will consume a USA Weather Forecast web service which is freely available at WebserviceX.NET
Using the code
To reference the Jquery AJAX script libraries, add the following markup at the end of the head element in Site.Master:
Comments
C# Training
Dot Net Training in Chennai
Dot Net Training institutes in Chennai
ASP.NET Training
ASP.Net MVC Training
Online MVC Training
Online MVC Training from India
MVC Training in Chennai