---
title: "AJAX (Asynchronous JavaScript and XML)"  
description: "Introduction  AJAX is used in web development. It signifies the capability to build applications that make a use of XmlHttpRequest object.AJAX is popu"  
author: "Amit Singh"  
published: 2010-09-07  
updated: 2020-03-04  
canonical: https://www.mindstick.com/articles/126/ajax-asynchronous-javascript-and-xml  
category: "ajax"  
tags: ["ajax"]  
reading_time: 2 minutes  

---

# AJAX (Asynchronous JavaScript and XML)

Introduction\

AJAX is used in web development. It signifies the capability to build applications that make a use of XmlHttpRequest object.

AJAX is popular after Google launch notable application like Google map, Google earth etc.

##### How it works

![Working of AJAX](https://www.mindstick.com/mindstickarticle/a2468378-03d5-400b-b888-19f79c5086aa/images/77a0befc-56a8-4138-a3b0-e92aa990470b.png)

Figure above demonstrates that the first thing that happens is the entire page is delivered in the initial request and response. From there, any partial updates required by the page are done using the client script library. This library can make asynchronous can requests and update just the portion of the page that needs updating. One major advantage to this is that a minimal amount of data is transferred for the updates to occur. Updating a partial page better than recalling the entire page for what is just a small change to the page.

##### ASP.Net page with AJAX

![AJAX Extensions](https://www.mindstick.com/mindstickarticle/a2468378-03d5-400b-b888-19f79c5086aa/images/b41a6c2e-2341-41e4-b165-f09071c4781f.png)

In visual studio 2008 toolbox, you will find new section titled AJAX Extensions (shown above). From AJAX Extension, add a ScriptManager server control to top of the page and include any other control inside UpdatePanel. the UpdatePanel is a template control and allows you to include any number of items within it.

##### Example:

##### How use the ScriptManager and UpdatePanel

**Step 1:** Choose the new web applicationand put the ScriptManager at the top, take some other control, two buttons and two textbox within UpdatePanel.

![Script Manager and Update Panel](https://www.mindstick.com/mindstickarticle/a2468378-03d5-400b-b888-19f79c5086aa/images/906fc945-d899-4436-abf7-ceecf2d5d06a.png)

**Step 2:** Run the application

When we press the withoutUPanel button then whole page will loading and data will be populated in both the textboxs.

![AJAX (Asynchronous JavaScript and XML)](https://www.mindstick.com/mindstickarticle/a2468378-03d5-400b-b888-19f79c5086aa/images/bc6561ab-2381-4874-9571-439ee118226a.png)

Now, when we press the withinUPanel button then data will be populated only in textbox within UpdatePanel.

![AJAX (Asynchronous JavaScript and XML)](https://www.mindstick.com/mindstickarticle/a2468378-03d5-400b-b888-19f79c5086aa/images/a9ff29d6-364c-4f84-8337-8122bb22dee7.png)

This application show the how we use the AJAX in our project and understand its benefits.

\

---

Original Source: https://www.mindstick.com/articles/126/ajax-asynchronous-javascript-and-xml

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
