SlideShare a Scribd company logo
1 of 22
AJAX
AJAX :

 AJAX is an acronym for Asynchronous JavaScript And XML.
 AJAX is not a programming language. But simply a development technique for
    creating interactive web applications and for creating fast and dynamic web pages.
   Classic web pages, (which do not use AJAX) must reload the entire page if the content
    should change.
   AJAX allows web pages to be updated asynchronously by exchanging small
    amounts of data with the server behind the scenes. This means that it is possible to
    update parts of a web page, without reloading the whole page.
 AJAX applications are browser- and platform-independent
 Examples of applications using AJAX:
         Google Maps, Gmail, YouTube and Face book tabs.
TECHNOLOGY BEHIND AJAX :


         Ajax is not a single technology, but it is a combination of many technologies.
These technologies are supported by modern web browsers.


      JavaScript:
        (JavaScript/DOM (to display/interact with the information)
      Asynchronous Call to the Server
         (XMLHttpRequest object (to exchange data asynchronously with a server))
      XML
         (often used as the format for transferring data)
 JavaScript
        AJAX uses JavaScript to send and receive data between a web browser
         and a web server
        DHTML and CSS is used to show the output to the user.
     JavaScript is used very heavily to provide the dynamic behavior to the
     application.

 Asynchronous Call to the Server

        Most of the Ajax application used the XMLHttpRequest object to send the
    request to the web server. These calls are Asynchronous and there is no need to wait
    for the response to come back. User can do the normal work without any problem.
 XML:


        XML may be used to receive the data returned from the web server. JavaScript
    can be used to process the XML data returned from the web server easily.
History Of Ajax
•   During browser innovation, Netscape added a feature known as LiveScript
    (LiveScript became JavaScript and grew more powerful,), allowed people to put
    small scripts in web pages so that they could continue to do things after you’d
    downloaded them.
•   Ajax came when the Internet Explorer introduced the concept of IFrame element.
    Microsoft introduced another technique, called as Microsoft’s Remote
    Scripting that technique involved the pulling of data through means of Java
    Applet which communicated with the client side using scripting language like
    JavaScript.
•   As soon Microsoft introduced new XMLHttpRequest object that acts as an ActiveX
    control in the Internet Explorer. Finally, in the year 2006, the W3C (World Wide
    Web Consortium) announced the release of the first draft that included the
    specification for the object (XMLHttpRequest) and made it an official web
    standard.
•   AJAX (first coined in the year 2005) is not a new programming language but a
    relatively new technique for creating faster, better and dynamic web
    applications. If you have the basic understanding of HTML, XHTML, XML and
    JavaScript languages then you can have a go with AJAX
•   AJAX is basically based on the following web standard, XML HTML JavaScript CSS.
HOW AJAX WORKS ?
          When user first visits the page, the Ajax engine is initialized and loaded. From
that point of time user interacts with Ajax engine to interact with the web server. The
Ajax engine operates asynchronously while sending the request to the server and
receiving the response from server.


AJAX LIFE CYCLE
User Visit to the page:
          User visits the URL by typing URL in browser or clicking a link from some
other page.


Initialization of Ajax engine:
          When the page is initially loaded, the Ajax engine is also initialized. The Ajax
engine can also be set to continuously refresh the page content without refreshing the
whole page.
Event Processing Loop:

  Browser event may instruct the Ajax engine to send request to
     server and receive the response data.
  Server response - Ajax engine receives the response from the server.
     Then it calls the JavaScript call back functions.
  Browser (View) update - JavaScript request call back functions is
     used to update the browser. DHTML and css is used to update the
     browser display.
BENEFITS OF AJAX :


    Ajax can be used for creating rich, web-based applications that look and
 works like a desktop application


    Ajax is easy to learn. Ajax is based on JavaScript and existing technologies
 like XML, CSS, and DHTML. Etc. So, it’s very easy to learn Ajax


  Ajax can be used to develop web applications that can update the page data
 continuously without refreshing the whole page
• First Program
1. Open new ASP.NET Web Site then click OK.
2. Open Tool Box and drag ScriptManager and UpdatePanel
   from AJAX Extensions. Then drag label and Button,
   named UsingAjax. Open properties window of
   UpdatePanel. Go to Triggers property and click on
   collection then add the controlID (Button name, which
   you want to make a AJAX part) and select Event (Click).
   Added one another button outside the UpdatePannel
   ,named WithoutAjax and a added another Label.
3. Paste the code in .cs file of the application
protected void with_ajax_Click1(object sender, EventArgs e)
 {
Label1.Text = DateTime.Now.ToString();
 }
protected void without_ajax_Click(object sender, EventArgs
   e)
 {
Label2.Text = DateTime.Now.ToString();
}
4. Debug the application
• Clicking on "Using Ajax Button" ,only first time (label) will be
   updated without reloading whole page.
•
   Clicking on "Without Ajax Button", whole page Reloaded.
Ajax Controls
•   You drop the controls to your page (Default.aspx) from the Tab Ajax
    Extensions.
1. ScriptManager Control
• Client script for AJAX-enable ASP.NET Web pages managed by
   ScriptManager control . ScriptManager control registered the
   client script for the Microsoft Ajax Library with the page.
   Script manager support features such as
• Partial-page rendering to the browser
• Web-service calls.
2. ScriptManagerProxy Control
• When a ScriptManager control is already defined in a parent
   element (or master page or host page already contains a
   ScriptManager control) then used ScriptManagerProxy control
   to enables nested components and user control to add service
   and script.
• 3. Timer control
• The ASP. NET AJAX Timer control
• Performed Postbacks of pages at defined intervals.
• Timer control with an UpdatePanel control, enable partial-
  page updates at a defined interval.
• If you want to post the whole page, used Timer Control.
• The Timer control requires specific settings in a web.config
  file in order to function correctly.
• If your application does not contain the required
  web.config file, errors appear in the Design view of the
  page where the control would have appeared.
4. UpdatePanel control
• Which area on web page you want to partial update, used under
   the UpdatePanel control. Don't wrap your entire page within an
   UpdatePanel. You may use several panels on your page.
   UpdatePanel control is the most important control in the ASP.NET
   AJAX package. It will AJAX controls contained within it, allowed to
   partial rendering of the area on the web page.

5. UpdateProgress Control
• UpdateProgress control provides status information about partial-
   page updates in UpdatePanel controls. UpdateProgress control
   provides, to customize the content. When a partial-page update is
   very fast, you can specify a delay before the UpdateProgress control
   is displayed.
Timer control
• The ASP. NET AJAX Timer control
• Performed Postbacks of pages at defined intervals.
• Timer control with an UpdatePanel control, enable
  partial-page updates at a defined interval.
• If you want to post the whole page, used Timer
  Control.
• The Timer control requires specific settings in a
  web.config file in order to function correctly.
• If your application does not contain the required
  web.config file, errors appear in the Design view of the
  page where the control would have appeared.
1. Drag ScriptManager Control, UpdatePanel and label
   from toolbox. After this add a timer control.
2. Open the properties of Update panel. Click on collection in
   tigger .
3.Select controlID and give the name of your Timer control and
   choose the event.
4.Paste the code in the Default.aspx.cs file on your Website
public partial class _Default : System.Web.UI.Page
{
 protected void Page_Load(object sender, EventArgs e) { }
protected void Timer1_Tick1(object sender, EventArgs e)
{
 Label1.Text = System.DateTime.Now.ToString();
}}
5. The design view of your Website
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
</div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate>
<asp:Label ID="Label1" runat="server"></asp:Label> </ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />
    </Triggers>
</asp:UpdatePanel>
<asp:Timer ID="Timer1" runat="server" ontick="Timer1_Tick1"
    Interval="60">
</asp:Timer>
</form> </body>
6. Debug the Application
• UpdatePanel control
• Which area on web page you want to partial update,
  used under the UpdatePanel control. Don't wrap your
  entire page within an UpdatePanel. You may use
  several panels on your page. UpdatePanel control is the
  most important control in the ASP.NET AJAX package. It
  will AJAX controls contained within it, allowed to
  partial rendering of the area on the web page.
  The <asp:UpdatePanel> tag has two childtags:
  1. ContentTemplate, The ContentTemplate tag holds
  the content of the panel. The content are anything
  that you would normally put on your page, from web
  controls
• 2. Triggers tags, The Triggers tag allows you to define certain
  triggers which will make the panel update there contents. The
  following example will show the use of both childtags.
• Go to properties of UpdatePanel control, click on Triggers a
  new window open. Add controls, which you want to make a
  part of web page for partial rendering.

More Related Content

What's hot

ASP.NET 03 - Working With Web Server Controls
ASP.NET 03 - Working With Web Server ControlsASP.NET 03 - Working With Web Server Controls
ASP.NET 03 - Working With Web Server ControlsRandy Connolly
 
ASP.Net Presentation Part1
ASP.Net Presentation Part1ASP.Net Presentation Part1
ASP.Net Presentation Part1Neeraj Mathur
 
ASP.NET AJAX Basics
ASP.NET AJAX BasicsASP.NET AJAX Basics
ASP.NET AJAX Basicspetrov
 
Introduction to ajax
Introduction to ajaxIntroduction to ajax
Introduction to ajaxNir Elbaz
 
ASP.NET Page Life Cycle
ASP.NET Page Life CycleASP.NET Page Life Cycle
ASP.NET Page Life CycleAbhishek Sur
 
Advanced SharePoint 2010 and 2013 Web Part Development by Rob Windsor - SPTec...
Advanced SharePoint 2010 and 2013 Web Part Development by Rob Windsor - SPTec...Advanced SharePoint 2010 and 2013 Web Part Development by Rob Windsor - SPTec...
Advanced SharePoint 2010 and 2013 Web Part Development by Rob Windsor - SPTec...SPTechCon
 
Introduction to ajax
Introduction  to  ajaxIntroduction  to  ajax
Introduction to ajaxPihu Goel
 
Asp.net server control
Asp.net  server controlAsp.net  server control
Asp.net server controlSireesh K
 
Ch 04 asp.net application
Ch 04 asp.net application Ch 04 asp.net application
Ch 04 asp.net application Madhuri Kavade
 
Ajax ppt - 32 slides
Ajax ppt - 32 slidesAjax ppt - 32 slides
Ajax ppt - 32 slidesSmithss25
 
Asynchronous JavaScript & XML (AJAX)
Asynchronous JavaScript & XML (AJAX)Asynchronous JavaScript & XML (AJAX)
Asynchronous JavaScript & XML (AJAX)Adnan Sohail
 

What's hot (20)

Ajax
AjaxAjax
Ajax
 
Web controls
Web controlsWeb controls
Web controls
 
Ajax
AjaxAjax
Ajax
 
ASP.NET 03 - Working With Web Server Controls
ASP.NET 03 - Working With Web Server ControlsASP.NET 03 - Working With Web Server Controls
ASP.NET 03 - Working With Web Server Controls
 
Ajax
AjaxAjax
Ajax
 
ASP.Net Presentation Part1
ASP.Net Presentation Part1ASP.Net Presentation Part1
ASP.Net Presentation Part1
 
ASP.NET AJAX Basics
ASP.NET AJAX BasicsASP.NET AJAX Basics
ASP.NET AJAX Basics
 
AJAX
AJAXAJAX
AJAX
 
Introduction to ajax
Introduction to ajaxIntroduction to ajax
Introduction to ajax
 
ASP.NET Page Life Cycle
ASP.NET Page Life CycleASP.NET Page Life Cycle
ASP.NET Page Life Cycle
 
Controls
ControlsControls
Controls
 
Advanced SharePoint 2010 and 2013 Web Part Development by Rob Windsor - SPTec...
Advanced SharePoint 2010 and 2013 Web Part Development by Rob Windsor - SPTec...Advanced SharePoint 2010 and 2013 Web Part Development by Rob Windsor - SPTec...
Advanced SharePoint 2010 and 2013 Web Part Development by Rob Windsor - SPTec...
 
Jquery Ajax
Jquery AjaxJquery Ajax
Jquery Ajax
 
Introduction to ajax
Introduction  to  ajaxIntroduction  to  ajax
Introduction to ajax
 
Introduction to ajax
Introduction to ajaxIntroduction to ajax
Introduction to ajax
 
Asp.net server control
Asp.net  server controlAsp.net  server control
Asp.net server control
 
Ch 04 asp.net application
Ch 04 asp.net application Ch 04 asp.net application
Ch 04 asp.net application
 
Ajax
AjaxAjax
Ajax
 
Ajax ppt - 32 slides
Ajax ppt - 32 slidesAjax ppt - 32 slides
Ajax ppt - 32 slides
 
Asynchronous JavaScript & XML (AJAX)
Asynchronous JavaScript & XML (AJAX)Asynchronous JavaScript & XML (AJAX)
Asynchronous JavaScript & XML (AJAX)
 

Viewers also liked

La Poesía
La PoesíaLa Poesía
La PoesíaDome0502
 
Bitcoin Exchange Romania
Bitcoin Exchange Romania Bitcoin Exchange Romania
Bitcoin Exchange Romania bitcoinromania
 
Expropacion petrolera 1
Expropacion petrolera 1Expropacion petrolera 1
Expropacion petrolera 1kashdoor
 
Agustino - IX A
Agustino - IX AAgustino - IX A
Agustino - IX A8oni
 
Rute angkutan-umum Jakarta
Rute angkutan-umum JakartaRute angkutan-umum Jakarta
Rute angkutan-umum JakartaLamhot Sihotang
 
게임넥스트웍스, 헤드헌터 비지니스 개시
게임넥스트웍스, 헤드헌터 비지니스 개시게임넥스트웍스, 헤드헌터 비지니스 개시
게임넥스트웍스, 헤드헌터 비지니스 개시GAMENEXT Works
 
Atps adm analise_de_investimentos(2)
Atps adm analise_de_investimentos(2)Atps adm analise_de_investimentos(2)
Atps adm analise_de_investimentos(2)priscilasetorg
 
SkinCarePlacemat
SkinCarePlacematSkinCarePlacemat
SkinCarePlacematPat L
 

Viewers also liked (14)

La Poesía
La PoesíaLa Poesía
La Poesía
 
Bitcoin Exchange Romania
Bitcoin Exchange Romania Bitcoin Exchange Romania
Bitcoin Exchange Romania
 
Expropacion petrolera 1
Expropacion petrolera 1Expropacion petrolera 1
Expropacion petrolera 1
 
Agustino - IX A
Agustino - IX AAgustino - IX A
Agustino - IX A
 
Wilson123
Wilson123Wilson123
Wilson123
 
Wilson1234
Wilson1234Wilson1234
Wilson1234
 
APPENDIX G
APPENDIX GAPPENDIX G
APPENDIX G
 
Proyecto de cableado estructurado
Proyecto de cableado estructuradoProyecto de cableado estructurado
Proyecto de cableado estructurado
 
Rute angkutan-umum Jakarta
Rute angkutan-umum JakartaRute angkutan-umum Jakarta
Rute angkutan-umum Jakarta
 
DISTRIBUCIÓN NORMAL.
DISTRIBUCIÓN NORMAL.DISTRIBUCIÓN NORMAL.
DISTRIBUCIÓN NORMAL.
 
게임넥스트웍스, 헤드헌터 비지니스 개시
게임넥스트웍스, 헤드헌터 비지니스 개시게임넥스트웍스, 헤드헌터 비지니스 개시
게임넥스트웍스, 헤드헌터 비지니스 개시
 
EVC caso clinico
EVC caso clinico EVC caso clinico
EVC caso clinico
 
Atps adm analise_de_investimentos(2)
Atps adm analise_de_investimentos(2)Atps adm analise_de_investimentos(2)
Atps adm analise_de_investimentos(2)
 
SkinCarePlacemat
SkinCarePlacematSkinCarePlacemat
SkinCarePlacemat
 

Similar to AJAX: Asynchronous JavaScript And XML (20)

SynapseIndia asp.net2.0 ajax Development
SynapseIndia asp.net2.0 ajax DevelopmentSynapseIndia asp.net2.0 ajax Development
SynapseIndia asp.net2.0 ajax Development
 
Ajax ppt
Ajax pptAjax ppt
Ajax ppt
 
Ajax Ppt 1
Ajax Ppt 1Ajax Ppt 1
Ajax Ppt 1
 
Ajax
AjaxAjax
Ajax
 
Asynchronous javascript and xml
Asynchronous javascript and xmlAsynchronous javascript and xml
Asynchronous javascript and xml
 
ASP.NET - Web Programming
ASP.NET - Web ProgrammingASP.NET - Web Programming
ASP.NET - Web Programming
 
Intoduction to Ajax
Intoduction to AjaxIntoduction to Ajax
Intoduction to Ajax
 
AJAX
AJAXAJAX
AJAX
 
Ajax & Reverse Ajax Presenation
Ajax & Reverse Ajax PresenationAjax & Reverse Ajax Presenation
Ajax & Reverse Ajax Presenation
 
Programming web application
Programming web applicationProgramming web application
Programming web application
 
Ajax ppt
Ajax pptAjax ppt
Ajax ppt
 
A View about ASP .NET and their objectives
A View about ASP .NET and their objectivesA View about ASP .NET and their objectives
A View about ASP .NET and their objectives
 
Ajax
AjaxAjax
Ajax
 
Ajax tutorial by bally chohan
Ajax tutorial by bally chohanAjax tutorial by bally chohan
Ajax tutorial by bally chohan
 
Ajax
AjaxAjax
Ajax
 
Ajax
AjaxAjax
Ajax
 
Ajax
AjaxAjax
Ajax
 
C sharp and asp.net interview questions
C sharp and asp.net interview questionsC sharp and asp.net interview questions
C sharp and asp.net interview questions
 
Ajax
AjaxAjax
Ajax
 
AJAX.pptx
AJAX.pptxAJAX.pptx
AJAX.pptx
 

Recently uploaded

原版定制copy澳洲查尔斯达尔文大学毕业证CDU毕业证成绩单留信学历认证保障质量
原版定制copy澳洲查尔斯达尔文大学毕业证CDU毕业证成绩单留信学历认证保障质量原版定制copy澳洲查尔斯达尔文大学毕业证CDU毕业证成绩单留信学历认证保障质量
原版定制copy澳洲查尔斯达尔文大学毕业证CDU毕业证成绩单留信学历认证保障质量sehgh15heh
 
Human Rights are notes and helping material
Human Rights are notes and helping materialHuman Rights are notes and helping material
Human Rights are notes and helping materialnadeemcollege26
 
Jumark Morit Diezmo- Career portfolio- BPED 3A
Jumark Morit Diezmo- Career portfolio- BPED 3AJumark Morit Diezmo- Career portfolio- BPED 3A
Jumark Morit Diezmo- Career portfolio- BPED 3Ajumarkdiezmo1
 
Gurgaon Call Girls: Free Delivery 24x7 at Your Doorstep G.G.N = 8377087607
Gurgaon Call Girls: Free Delivery 24x7 at Your Doorstep G.G.N = 8377087607Gurgaon Call Girls: Free Delivery 24x7 at Your Doorstep G.G.N = 8377087607
Gurgaon Call Girls: Free Delivery 24x7 at Your Doorstep G.G.N = 8377087607dollysharma2066
 
Application deck- Cyril Caudroy-2024.pdf
Application deck- Cyril Caudroy-2024.pdfApplication deck- Cyril Caudroy-2024.pdf
Application deck- Cyril Caudroy-2024.pdfCyril CAUDROY
 
LinkedIn Strategic Guidelines April 2024
LinkedIn Strategic Guidelines April 2024LinkedIn Strategic Guidelines April 2024
LinkedIn Strategic Guidelines April 2024Bruce Bennett
 
Crack JAG. Guidance program for entry to JAG Dept. & SSB interview
Crack JAG. Guidance program for entry to JAG Dept. & SSB interviewCrack JAG. Guidance program for entry to JAG Dept. & SSB interview
Crack JAG. Guidance program for entry to JAG Dept. & SSB interviewNilendra Kumar
 
Nathan_Baughman_Resume_copywriter_and_editor
Nathan_Baughman_Resume_copywriter_and_editorNathan_Baughman_Resume_copywriter_and_editor
Nathan_Baughman_Resume_copywriter_and_editorNathanBaughman3
 
The Next Things To Immediately Do About Mating Press
The Next Things To Immediately Do About Mating PressThe Next Things To Immediately Do About Mating Press
The Next Things To Immediately Do About Mating Pressmatingpress170
 
Digital Marketing Training Institute in Mohali, India
Digital Marketing Training Institute in Mohali, IndiaDigital Marketing Training Institute in Mohali, India
Digital Marketing Training Institute in Mohali, IndiaDigital Discovery Institute
 
原版快速办理MQU毕业证麦考瑞大学毕业证成绩单留信学历认证
原版快速办理MQU毕业证麦考瑞大学毕业证成绩单留信学历认证原版快速办理MQU毕业证麦考瑞大学毕业证成绩单留信学历认证
原版快速办理MQU毕业证麦考瑞大学毕业证成绩单留信学历认证nhjeo1gg
 
Back on Track: Navigating the Return to Work after Parental Leave
Back on Track: Navigating the Return to Work after Parental LeaveBack on Track: Navigating the Return to Work after Parental Leave
Back on Track: Navigating the Return to Work after Parental LeaveMarharyta Nedzelska
 
Unlock Your Creative Potential: 7 Skills for Content Creator Evolution
Unlock Your Creative Potential: 7 Skills for Content Creator EvolutionUnlock Your Creative Potential: 7 Skills for Content Creator Evolution
Unlock Your Creative Potential: 7 Skills for Content Creator EvolutionRhazes Ghaisan
 
Black and White Minimalist Co Letter.pdf
Black and White Minimalist Co Letter.pdfBlack and White Minimalist Co Letter.pdf
Black and White Minimalist Co Letter.pdfpadillaangelina0023
 
Storytelling, Ethics and Workflow in Documentary Photography
Storytelling, Ethics and Workflow in Documentary PhotographyStorytelling, Ethics and Workflow in Documentary Photography
Storytelling, Ethics and Workflow in Documentary PhotographyOrtega Alikwe
 
美国SU学位证,雪城大学毕业证书1:1制作
美国SU学位证,雪城大学毕业证书1:1制作美国SU学位证,雪城大学毕业证书1:1制作
美国SU学位证,雪城大学毕业证书1:1制作ss846v0c
 
办理老道明大学毕业证成绩单|购买美国ODU文凭证书
办理老道明大学毕业证成绩单|购买美国ODU文凭证书办理老道明大学毕业证成绩单|购买美国ODU文凭证书
办理老道明大学毕业证成绩单|购买美国ODU文凭证书saphesg8
 
Introduction to phyton , important topic
Introduction to phyton , important topicIntroduction to phyton , important topic
Introduction to phyton , important topicakpgenious67
 
Escort Service Andheri WhatsApp:+91-9833363713
Escort Service Andheri WhatsApp:+91-9833363713Escort Service Andheri WhatsApp:+91-9833363713
Escort Service Andheri WhatsApp:+91-9833363713Riya Pathan
 
办理学位证(Massey证书)新西兰梅西大学毕业证成绩单原版一比一
办理学位证(Massey证书)新西兰梅西大学毕业证成绩单原版一比一办理学位证(Massey证书)新西兰梅西大学毕业证成绩单原版一比一
办理学位证(Massey证书)新西兰梅西大学毕业证成绩单原版一比一A SSS
 

Recently uploaded (20)

原版定制copy澳洲查尔斯达尔文大学毕业证CDU毕业证成绩单留信学历认证保障质量
原版定制copy澳洲查尔斯达尔文大学毕业证CDU毕业证成绩单留信学历认证保障质量原版定制copy澳洲查尔斯达尔文大学毕业证CDU毕业证成绩单留信学历认证保障质量
原版定制copy澳洲查尔斯达尔文大学毕业证CDU毕业证成绩单留信学历认证保障质量
 
Human Rights are notes and helping material
Human Rights are notes and helping materialHuman Rights are notes and helping material
Human Rights are notes and helping material
 
Jumark Morit Diezmo- Career portfolio- BPED 3A
Jumark Morit Diezmo- Career portfolio- BPED 3AJumark Morit Diezmo- Career portfolio- BPED 3A
Jumark Morit Diezmo- Career portfolio- BPED 3A
 
Gurgaon Call Girls: Free Delivery 24x7 at Your Doorstep G.G.N = 8377087607
Gurgaon Call Girls: Free Delivery 24x7 at Your Doorstep G.G.N = 8377087607Gurgaon Call Girls: Free Delivery 24x7 at Your Doorstep G.G.N = 8377087607
Gurgaon Call Girls: Free Delivery 24x7 at Your Doorstep G.G.N = 8377087607
 
Application deck- Cyril Caudroy-2024.pdf
Application deck- Cyril Caudroy-2024.pdfApplication deck- Cyril Caudroy-2024.pdf
Application deck- Cyril Caudroy-2024.pdf
 
LinkedIn Strategic Guidelines April 2024
LinkedIn Strategic Guidelines April 2024LinkedIn Strategic Guidelines April 2024
LinkedIn Strategic Guidelines April 2024
 
Crack JAG. Guidance program for entry to JAG Dept. & SSB interview
Crack JAG. Guidance program for entry to JAG Dept. & SSB interviewCrack JAG. Guidance program for entry to JAG Dept. & SSB interview
Crack JAG. Guidance program for entry to JAG Dept. & SSB interview
 
Nathan_Baughman_Resume_copywriter_and_editor
Nathan_Baughman_Resume_copywriter_and_editorNathan_Baughman_Resume_copywriter_and_editor
Nathan_Baughman_Resume_copywriter_and_editor
 
The Next Things To Immediately Do About Mating Press
The Next Things To Immediately Do About Mating PressThe Next Things To Immediately Do About Mating Press
The Next Things To Immediately Do About Mating Press
 
Digital Marketing Training Institute in Mohali, India
Digital Marketing Training Institute in Mohali, IndiaDigital Marketing Training Institute in Mohali, India
Digital Marketing Training Institute in Mohali, India
 
原版快速办理MQU毕业证麦考瑞大学毕业证成绩单留信学历认证
原版快速办理MQU毕业证麦考瑞大学毕业证成绩单留信学历认证原版快速办理MQU毕业证麦考瑞大学毕业证成绩单留信学历认证
原版快速办理MQU毕业证麦考瑞大学毕业证成绩单留信学历认证
 
Back on Track: Navigating the Return to Work after Parental Leave
Back on Track: Navigating the Return to Work after Parental LeaveBack on Track: Navigating the Return to Work after Parental Leave
Back on Track: Navigating the Return to Work after Parental Leave
 
Unlock Your Creative Potential: 7 Skills for Content Creator Evolution
Unlock Your Creative Potential: 7 Skills for Content Creator EvolutionUnlock Your Creative Potential: 7 Skills for Content Creator Evolution
Unlock Your Creative Potential: 7 Skills for Content Creator Evolution
 
Black and White Minimalist Co Letter.pdf
Black and White Minimalist Co Letter.pdfBlack and White Minimalist Co Letter.pdf
Black and White Minimalist Co Letter.pdf
 
Storytelling, Ethics and Workflow in Documentary Photography
Storytelling, Ethics and Workflow in Documentary PhotographyStorytelling, Ethics and Workflow in Documentary Photography
Storytelling, Ethics and Workflow in Documentary Photography
 
美国SU学位证,雪城大学毕业证书1:1制作
美国SU学位证,雪城大学毕业证书1:1制作美国SU学位证,雪城大学毕业证书1:1制作
美国SU学位证,雪城大学毕业证书1:1制作
 
办理老道明大学毕业证成绩单|购买美国ODU文凭证书
办理老道明大学毕业证成绩单|购买美国ODU文凭证书办理老道明大学毕业证成绩单|购买美国ODU文凭证书
办理老道明大学毕业证成绩单|购买美国ODU文凭证书
 
Introduction to phyton , important topic
Introduction to phyton , important topicIntroduction to phyton , important topic
Introduction to phyton , important topic
 
Escort Service Andheri WhatsApp:+91-9833363713
Escort Service Andheri WhatsApp:+91-9833363713Escort Service Andheri WhatsApp:+91-9833363713
Escort Service Andheri WhatsApp:+91-9833363713
 
办理学位证(Massey证书)新西兰梅西大学毕业证成绩单原版一比一
办理学位证(Massey证书)新西兰梅西大学毕业证成绩单原版一比一办理学位证(Massey证书)新西兰梅西大学毕业证成绩单原版一比一
办理学位证(Massey证书)新西兰梅西大学毕业证成绩单原版一比一
 

AJAX: Asynchronous JavaScript And XML

  • 2. AJAX :  AJAX is an acronym for Asynchronous JavaScript And XML.  AJAX is not a programming language. But simply a development technique for creating interactive web applications and for creating fast and dynamic web pages.  Classic web pages, (which do not use AJAX) must reload the entire page if the content should change.  AJAX allows web pages to be updated asynchronously by exchanging small amounts of data with the server behind the scenes. This means that it is possible to update parts of a web page, without reloading the whole page.  AJAX applications are browser- and platform-independent  Examples of applications using AJAX: Google Maps, Gmail, YouTube and Face book tabs.
  • 3. TECHNOLOGY BEHIND AJAX : Ajax is not a single technology, but it is a combination of many technologies. These technologies are supported by modern web browsers.  JavaScript: (JavaScript/DOM (to display/interact with the information)  Asynchronous Call to the Server (XMLHttpRequest object (to exchange data asynchronously with a server))  XML (often used as the format for transferring data)
  • 4.  JavaScript  AJAX uses JavaScript to send and receive data between a web browser and a web server  DHTML and CSS is used to show the output to the user.  JavaScript is used very heavily to provide the dynamic behavior to the application.  Asynchronous Call to the Server  Most of the Ajax application used the XMLHttpRequest object to send the request to the web server. These calls are Asynchronous and there is no need to wait for the response to come back. User can do the normal work without any problem.  XML:  XML may be used to receive the data returned from the web server. JavaScript can be used to process the XML data returned from the web server easily.
  • 5. History Of Ajax • During browser innovation, Netscape added a feature known as LiveScript (LiveScript became JavaScript and grew more powerful,), allowed people to put small scripts in web pages so that they could continue to do things after you’d downloaded them. • Ajax came when the Internet Explorer introduced the concept of IFrame element. Microsoft introduced another technique, called as Microsoft’s Remote Scripting that technique involved the pulling of data through means of Java Applet which communicated with the client side using scripting language like JavaScript. • As soon Microsoft introduced new XMLHttpRequest object that acts as an ActiveX control in the Internet Explorer. Finally, in the year 2006, the W3C (World Wide Web Consortium) announced the release of the first draft that included the specification for the object (XMLHttpRequest) and made it an official web standard. • AJAX (first coined in the year 2005) is not a new programming language but a relatively new technique for creating faster, better and dynamic web applications. If you have the basic understanding of HTML, XHTML, XML and JavaScript languages then you can have a go with AJAX • AJAX is basically based on the following web standard, XML HTML JavaScript CSS.
  • 6. HOW AJAX WORKS ? When user first visits the page, the Ajax engine is initialized and loaded. From that point of time user interacts with Ajax engine to interact with the web server. The Ajax engine operates asynchronously while sending the request to the server and receiving the response from server. AJAX LIFE CYCLE User Visit to the page: User visits the URL by typing URL in browser or clicking a link from some other page. Initialization of Ajax engine: When the page is initially loaded, the Ajax engine is also initialized. The Ajax engine can also be set to continuously refresh the page content without refreshing the whole page.
  • 7. Event Processing Loop:  Browser event may instruct the Ajax engine to send request to server and receive the response data.  Server response - Ajax engine receives the response from the server. Then it calls the JavaScript call back functions.  Browser (View) update - JavaScript request call back functions is used to update the browser. DHTML and css is used to update the browser display.
  • 8. BENEFITS OF AJAX :  Ajax can be used for creating rich, web-based applications that look and works like a desktop application  Ajax is easy to learn. Ajax is based on JavaScript and existing technologies like XML, CSS, and DHTML. Etc. So, it’s very easy to learn Ajax  Ajax can be used to develop web applications that can update the page data continuously without refreshing the whole page
  • 9. • First Program 1. Open new ASP.NET Web Site then click OK. 2. Open Tool Box and drag ScriptManager and UpdatePanel from AJAX Extensions. Then drag label and Button, named UsingAjax. Open properties window of UpdatePanel. Go to Triggers property and click on collection then add the controlID (Button name, which you want to make a AJAX part) and select Event (Click). Added one another button outside the UpdatePannel ,named WithoutAjax and a added another Label.
  • 10. 3. Paste the code in .cs file of the application protected void with_ajax_Click1(object sender, EventArgs e) { Label1.Text = DateTime.Now.ToString(); } protected void without_ajax_Click(object sender, EventArgs e) { Label2.Text = DateTime.Now.ToString(); }
  • 11. 4. Debug the application • Clicking on "Using Ajax Button" ,only first time (label) will be updated without reloading whole page. • Clicking on "Without Ajax Button", whole page Reloaded.
  • 12. Ajax Controls • You drop the controls to your page (Default.aspx) from the Tab Ajax Extensions. 1. ScriptManager Control • Client script for AJAX-enable ASP.NET Web pages managed by ScriptManager control . ScriptManager control registered the client script for the Microsoft Ajax Library with the page. Script manager support features such as • Partial-page rendering to the browser • Web-service calls. 2. ScriptManagerProxy Control • When a ScriptManager control is already defined in a parent element (or master page or host page already contains a ScriptManager control) then used ScriptManagerProxy control to enables nested components and user control to add service and script.
  • 13. • 3. Timer control • The ASP. NET AJAX Timer control • Performed Postbacks of pages at defined intervals. • Timer control with an UpdatePanel control, enable partial- page updates at a defined interval. • If you want to post the whole page, used Timer Control. • The Timer control requires specific settings in a web.config file in order to function correctly. • If your application does not contain the required web.config file, errors appear in the Design view of the page where the control would have appeared.
  • 14. 4. UpdatePanel control • Which area on web page you want to partial update, used under the UpdatePanel control. Don't wrap your entire page within an UpdatePanel. You may use several panels on your page. UpdatePanel control is the most important control in the ASP.NET AJAX package. It will AJAX controls contained within it, allowed to partial rendering of the area on the web page. 5. UpdateProgress Control • UpdateProgress control provides status information about partial- page updates in UpdatePanel controls. UpdateProgress control provides, to customize the content. When a partial-page update is very fast, you can specify a delay before the UpdateProgress control is displayed.
  • 15. Timer control • The ASP. NET AJAX Timer control • Performed Postbacks of pages at defined intervals. • Timer control with an UpdatePanel control, enable partial-page updates at a defined interval. • If you want to post the whole page, used Timer Control. • The Timer control requires specific settings in a web.config file in order to function correctly. • If your application does not contain the required web.config file, errors appear in the Design view of the page where the control would have appeared.
  • 16. 1. Drag ScriptManager Control, UpdatePanel and label from toolbox. After this add a timer control.
  • 17. 2. Open the properties of Update panel. Click on collection in tigger . 3.Select controlID and give the name of your Timer control and choose the event.
  • 18. 4.Paste the code in the Default.aspx.cs file on your Website public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void Timer1_Tick1(object sender, EventArgs e) { Label1.Text = System.DateTime.Now.ToString(); }}
  • 19. 5. The design view of your Website <body> <form id="form1" runat="server"> <div> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> </div> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:Label ID="Label1" runat="server"></asp:Label> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" /> </Triggers> </asp:UpdatePanel> <asp:Timer ID="Timer1" runat="server" ontick="Timer1_Tick1" Interval="60"> </asp:Timer> </form> </body>
  • 20. 6. Debug the Application
  • 21. • UpdatePanel control • Which area on web page you want to partial update, used under the UpdatePanel control. Don't wrap your entire page within an UpdatePanel. You may use several panels on your page. UpdatePanel control is the most important control in the ASP.NET AJAX package. It will AJAX controls contained within it, allowed to partial rendering of the area on the web page. The <asp:UpdatePanel> tag has two childtags: 1. ContentTemplate, The ContentTemplate tag holds the content of the panel. The content are anything that you would normally put on your page, from web controls
  • 22. • 2. Triggers tags, The Triggers tag allows you to define certain triggers which will make the panel update there contents. The following example will show the use of both childtags. • Go to properties of UpdatePanel control, click on Triggers a new window open. Add controls, which you want to make a part of web page for partial rendering.