Understanding Asp.Net Ajax Controls

 Asp.Net Ajax

AJAX:

Ajax Stands for Asynchronous javascript and XML. Ajax is a cross-platform technique which speeds up response time. The Ajax server controls add the script to the page which is executed and processed by the browser.

Asp.Net Ajax made up of:

• Asp.Net Ajax on the client
• Asp.Net Ajax on the Server

FREE PDF DOWNLOAD FOR MICROSOFT DOT NET COURSE MATERIAL

Asp.Net Ajax Extensions:

The control toolbox in the Visual Studio IDE contains a group of controls called the Ajax Extensions.

ajax_extensions

The Script Manager Control:

Asp.Net Ajax the Script Manager control is the very most important control and must be present on the page for other controls to work.

Syntax for Script manager Control

<asp:ScriptManager ID=”ScriptManager1″ runat=”server”>

</asp:ScriptManager>

Timer Control:

In Ajax Extensions the timer control is used to initiate the postback automatically. The Two ways to timer Control is

Syntax for Timer Control

<Triggers>

   <asp:AsyncPostBackTrigger ControlID=”btnpanel2″ EventName=”Click” />

</Triggers>

• Setting the Triggers property of the Update Panel control:
• Placing a timer control directly inside the Update Panel to act as a child control trigger.

Update Panel control:

Asp.Net Ajax the Update Panel control is a container control and derives from the Control class. Update panel acts as a container for the child controls within it and does not have its own interface. A control inside Update panel triggers a postback, it intervenes to initiate the post asynchronously and update just that portion of the page.

Syntax for update panel control

<asp:UpdatePanel ID=”UpdatePanel1″ runat=”server”>

  </asp:UpdatePanel>

Update Progress Control :

The Update Progress control provides a sort of feedback on the browser while one or more update panel controls are being updated. A Client login or waits for server response while performing database oriented task. Update progress control provides a visual acknowledgment like Loading page indicating the work is in progress.

Syntax for Update Progress Control

<asp:UpdateProgress ID=”UpdateProgress1″ runat=”server” DynamicLayout=”true” AssociatedUpdatePanelID=”UpdatePanel1″ >

   <ProgressTemplate>

      Loading…

   </ProgressTemplate>

   </asp:UpdateProgress>

FREE PDF DOWNLOAD FOR ASP.NET MVC COURSE MATERIAL

Advantages of AJAX :

 The advantages of  Asp.Net Ajax  over classical web-based applications include

  • Minimal data transfer – By not performing a full postback and sending all form data to the server, network utilization is minimized and quicker operations occur.
  • Asynchronous calls –Ajax allows for the ability to make asynchronous calls to a web server.
  • Minimal data transfer – By not performing a full postback and sending all form data to the server, network utilization is minimized and quicker operations occur.
  • Responsiveness– Ajax applications are asynchronous on the client, they are perceived to be very responsive.
  • Limited processing on the server– Along with the fact that only the necessary data is sent to the server, the server is not required to process all form elements.