SlideShare a Scribd company logo
1 of 16
• Understanding Ajax
• Advantages & Disadvantages of Ajax
• The Script Manager
• Update Panel
• Partial Updates
• Conditional Updates
• Triggers
• Progress Notification
• Timed Refreshes
• ASP.NET AJAX Control Toolkit
Ajax is programming shorthand for a set of techniques
that create more responsive, dynamic pages that refresh
themselves quickly and flicker-free.

One of the hallmarks of Ajax is the ability to refresh part
of the page while leaving the rest untouched.

Technically, it’s a short form for Asynchronous JavaScript
and XML, although this technique is now considered to
be just one of several possible characteristics of an Ajax
web application.
• The key benefit of Ajax is responsiveness because it
  can react immediately updating the page
  partially, leaving the unchanged portion untouched

• An Ajax application, when done properly, provides a
  better flicker free experience for the user.




• Complexity
• Browser Support
In order to use ASP.NET AJAX, you need to place the ScriptManager
control on your webpage.

It adds the links to the ASP.NET AJAX JavaScript libraries. It does that
by inserting a script block
<script src="/YourWebSite/ScriptResource.axd?d=RUSU1mI ..."
type="text/javascript">
</script>

ScriptResource.axd is a resource that tells ASP.NET to find a
JavaScript file that’s embedded in one of the compiled .NET 4
assemblies.

The JavaScript file is only downloaded once, and then cached by the
browser so it can be used by various pages in the website.
ASP.NET includes a handy control called UpdatePanel that lets
you take an ordinary page with server-side logic and make sure
it refreshes itself in flicker-free Ajax style using partial updates.

The basic idea is that you divide your web page into one or more
distinct regions, each of which is wrapped inside an invisible
UpdatePanel.

When an event occurs in a control that’s located inside an
UpdatePanel, and this event would normally trigger a full-page
postback, the UpdatePanel intercepts the event and performs an
asynchronous callback instead.

The only difference is the means of communication (the page
uses an asynchronous call to get the new data) and the way the
received data is dealt with (the UpdatePanel refreshes its inner
content, but the remainder of the page is not changed).
1. The user clicks a button inside an UpdatePanel.

2. The UpdatePanel intercepts the client-side click.
Now, ASP.NET AJAX performs a callback to the server
instead of a full-page postback.

3. On the server, normal page life cycle executes, with all
the usual events. Finally, the page is rendered to HTML
and returned to the browser.

4. ASP.NET AJAX receives HTML content for every
UpdatePanel on the page. The client-side script code
then updates the page, replacing the existing HTML that’s
in each panel with the new content. (If a change has
occurred to content that’s not inside an UpdatePanel, it’s
ignored.)
The key technique in an Ajax web application is
partial refreshes.

With partial refreshes, the entire page doesn’t
need to be posted back and refreshed in the
browser.

The request takes place in the background, so
the webpage remains responsive.

When the web page receives the response, it
updates just the changed portion of the page,
In complex pages, you might have more than one
UpdatePanel. In this case, when one UpdatePanel
triggers an update, all the UpdatePanel regions will be
refreshed.

In this situation, you can configure the panels to update
themselves independently. Simply change the
UpdatePanel.UpdateMode property from Always to
Conditional.

The UpdatePanel will refresh itself only if an event
occurs in one of the controls in that UpdatePanel.
If you move the controls that fire postback out of the
UpdatePanel, their events won’t be intercepted any
longer, and they’ll trigger full-page postbacks with the
familiar flicker.

The solution is to explicitly tell the UpdatePanel to
monitor those controls, even though they aren’t
inside the UpdatePanel. You can do this by adding
triggers to the UpdatePanel.

Just select the UpdatePanel, click the Triggers property
in the Properties window, and click the ellipsis (...) that
appears in the Triggers box. Visual Studio will open a
dialog box where you can add as many triggers as you
want, and pick the control for each trigger from a drop-
down list.
<asp:UpdatePanel ID="UpdatePanel1" runat="server"
UpdateMode="Conditional">
<ContentTemplate>
<asp:Label ID="Label1" runat="server" Font-
Bold="True"></asp:Label>
<br />
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID=“cmdPostBack" />
</Triggers>
</asp:UpdatePanel>


<asp:Button ID="cmdPostback" runat="server" Text="Refresh Full
Page" />
ASP.NET includes UpdateProgress control that allows
you to show a message while a time-consuming
asynchronous request is under way.

The UpdateProgress control works in conjunction with
the UpdatePanel.

When you add the UpdateProgress control to a
page, you get the ability to specify some content that will
appear as soon as an asynchronous request is started
and disappear as soon as the request is finished.

This content can include a fixed message, but many
people prefer to use an animated GIF
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<div style="background-color:#FFFFE0;padding: 20px">
<asp:Label ID="lblTime" runat="server" Font-
Bold="True"></asp:Label>
<br /><br />
<asp:Button ID="cmdRefreshTime" runat="server"
OnClick="cmdRefreshTime_Click"
Text="Start the Refresh Process" />
</div>
</ContentTemplate>
</asp:UpdatePanel>
<br />
<asp:UpdateProgress ID="updateProgress1" runat="server">
<ProgressTemplate>
<div style="font-size: xx-small">
Contacting Server ... <img src="wait.gif" alt="Waiting..." />
</div>
</ProgressTemplate>
</asp:UpdateProgress>
In some situations, you might want to force a full or
partial page refresh without waiting for a user
action.

For example, you might create a page that includes
a stock ticker, and you might want to refresh this
ticker periodically (say, every five minutes) to
ensure it doesn’t become drastically outdated.

ASP.NET includes a Timer control that allows you to
implement this design easily.
<asp:Timer ID="Timer1" runat="server"
Interval="60000" />

<asp:UpdatePanel ID="UpdatePanel1"
runat="server" UpdateMode="Conditional">
<ContentTemplate>
...
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger
ControlID="Timer1" EventName="Tick" />
</Triggers>
</asp:UpdatePanel>
The ASP.NET AJAX Control Toolkit is a joint project
between Microsoft and the ASP.NET community. It
consists of dozens of controls that use the ASP.NET
AJAX libraries to create sophisticated effects.

To get the ASP.NET AJAX Control Toolkit, surf to
http://www.asp.net/ajaxlibrary/act.ashx.

A 6.4 MB ZIP file which is designed for ASP.NET 4 is
named AjaxControlToolkit.Binary.NET4.zip.

Inside the ZIP file, you’ll find a central assembly named
AjaxControlToolkit.dll and a host of smaller satellite
assemblies that support localization for different
cultures.

More Related Content

What's hot

Deploy with maven
Deploy with mavenDeploy with maven
Deploy with mavenSon Nguyen
 
Demo on Mule ESB Facebook Connector
Demo on Mule ESB Facebook ConnectorDemo on Mule ESB Facebook Connector
Demo on Mule ESB Facebook ConnectorRupesh Sinha
 
ASP.NET Session 9
ASP.NET Session 9ASP.NET Session 9
ASP.NET Session 9Sisir Ghosh
 
Cloud hub with mule
Cloud hub with muleCloud hub with mule
Cloud hub with muleSon Nguyen
 
Expose web service
Expose web serviceExpose web service
Expose web serviceSon Nguyen
 
03 asp.net session04
03 asp.net session0403 asp.net session04
03 asp.net session04Vivek chan
 
Asp.net life cycle in depth
Asp.net life cycle in depthAsp.net life cycle in depth
Asp.net life cycle in depthsonia merchant
 
My journey and learnings using mule esb part 1
My journey and learnings using mule esb part 1My journey and learnings using mule esb part 1
My journey and learnings using mule esb part 1Alex Fernandez
 
Java spring mysql without hibernate(2) (1)
Java spring mysql without hibernate(2) (1)Java spring mysql without hibernate(2) (1)
Java spring mysql without hibernate(2) (1)AmedJacobReza
 
Integrate to retrieve data microsoft azure
Integrate to retrieve data microsoft azureIntegrate to retrieve data microsoft azure
Integrate to retrieve data microsoft azureSon Nguyen
 
ASP.NET Session 10
ASP.NET Session 10ASP.NET Session 10
ASP.NET Session 10Sisir Ghosh
 
Configuring Anypoint Studio MQ connector
Configuring Anypoint Studio MQ connectorConfiguring Anypoint Studio MQ connector
Configuring Anypoint Studio MQ connectorShanky Gupta
 
Mule esb - How to connect to a MySql Database in 5 minutes
Mule esb - How to connect to a MySql Database in 5 minutesMule esb - How to connect to a MySql Database in 5 minutes
Mule esb - How to connect to a MySql Database in 5 minutesGennaro Spagnoli
 
ASP.NET Session 6
ASP.NET Session 6ASP.NET Session 6
ASP.NET Session 6Sisir Ghosh
 

What's hot (20)

Deploy with maven
Deploy with mavenDeploy with maven
Deploy with maven
 
Wap tquickstart
Wap tquickstartWap tquickstart
Wap tquickstart
 
Demo on Mule ESB Facebook Connector
Demo on Mule ESB Facebook ConnectorDemo on Mule ESB Facebook Connector
Demo on Mule ESB Facebook Connector
 
ASP.NET Session 9
ASP.NET Session 9ASP.NET Session 9
ASP.NET Session 9
 
Mule esb
Mule esbMule esb
Mule esb
 
Cloud hub with mule
Cloud hub with muleCloud hub with mule
Cloud hub with mule
 
Expose web service
Expose web serviceExpose web service
Expose web service
 
03 asp.net session04
03 asp.net session0403 asp.net session04
03 asp.net session04
 
Example mule
Example muleExample mule
Example mule
 
App engine install-windows
App engine install-windowsApp engine install-windows
App engine install-windows
 
Asp.net life cycle in depth
Asp.net life cycle in depthAsp.net life cycle in depth
Asp.net life cycle in depth
 
My journey and learnings using mule esb part 1
My journey and learnings using mule esb part 1My journey and learnings using mule esb part 1
My journey and learnings using mule esb part 1
 
Java spring mysql without hibernate(2) (1)
Java spring mysql without hibernate(2) (1)Java spring mysql without hibernate(2) (1)
Java spring mysql without hibernate(2) (1)
 
Integrate to retrieve data microsoft azure
Integrate to retrieve data microsoft azureIntegrate to retrieve data microsoft azure
Integrate to retrieve data microsoft azure
 
ASP.NET Session 10
ASP.NET Session 10ASP.NET Session 10
ASP.NET Session 10
 
Configuring Anypoint Studio MQ connector
Configuring Anypoint Studio MQ connectorConfiguring Anypoint Studio MQ connector
Configuring Anypoint Studio MQ connector
 
Web Controls Set-1
Web Controls Set-1Web Controls Set-1
Web Controls Set-1
 
Mule esb - How to connect to a MySql Database in 5 minutes
Mule esb - How to connect to a MySql Database in 5 minutesMule esb - How to connect to a MySql Database in 5 minutes
Mule esb - How to connect to a MySql Database in 5 minutes
 
Mule maven
Mule mavenMule maven
Mule maven
 
ASP.NET Session 6
ASP.NET Session 6ASP.NET Session 6
ASP.NET Session 6
 

Viewers also liked

Viewers also liked (20)

Intro To ECAT
Intro To ECATIntro To ECAT
Intro To ECAT
 
Chapter 12
Chapter 12Chapter 12
Chapter 12
 
CSS
CSSCSS
CSS
 
Chapter 19
Chapter 19Chapter 19
Chapter 19
 
CSS3 notes
CSS3 notesCSS3 notes
CSS3 notes
 
HTML5 &CSS: Chapter 08
HTML5 &CSS: Chapter 08HTML5 &CSS: Chapter 08
HTML5 &CSS: Chapter 08
 
HTML: Chapter 01
HTML: Chapter 01HTML: Chapter 01
HTML: Chapter 01
 
HTML & CSS: Chapter 07
HTML & CSS: Chapter 07HTML & CSS: Chapter 07
HTML & CSS: Chapter 07
 
Html and CSS: Chapter 02
Html and CSS: Chapter 02Html and CSS: Chapter 02
Html and CSS: Chapter 02
 
HTML & CSS: Chapter 03
HTML & CSS: Chapter 03HTML & CSS: Chapter 03
HTML & CSS: Chapter 03
 
HTML & CSS: Chapter 06
HTML & CSS: Chapter 06HTML & CSS: Chapter 06
HTML & CSS: Chapter 06
 
CSS - Basics
CSS - BasicsCSS - Basics
CSS - Basics
 
Unit 6, Lesson 3 - Vectors
Unit 6, Lesson 3 - VectorsUnit 6, Lesson 3 - Vectors
Unit 6, Lesson 3 - Vectors
 
HTML & CSS: Chapter 04
HTML & CSS: Chapter 04HTML & CSS: Chapter 04
HTML & CSS: Chapter 04
 
Bread board
Bread boardBread board
Bread board
 
Breadboard
BreadboardBreadboard
Breadboard
 
Basic css
Basic cssBasic css
Basic css
 
Web Engineering - Basic CSS Properties
Web Engineering - Basic CSS PropertiesWeb Engineering - Basic CSS Properties
Web Engineering - Basic CSS Properties
 
Vernier caliper
Vernier caliperVernier caliper
Vernier caliper
 
Spline Interpolation
Spline InterpolationSpline Interpolation
Spline Interpolation
 

Similar to Chapter 25

Ajax control asp.net
Ajax control asp.netAjax control asp.net
Ajax control asp.netSireesh K
 
ASP.NET AJAX Basics
ASP.NET AJAX BasicsASP.NET AJAX Basics
ASP.NET AJAX Basicspetrov
 
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 questionsAkhil Mittal
 
Chanhao Jiang And David Wei Presentation Quickling Pagecache
Chanhao Jiang And David Wei Presentation Quickling PagecacheChanhao Jiang And David Wei Presentation Quickling Pagecache
Chanhao Jiang And David Wei Presentation Quickling PagecacheAjax Experience 2009
 
ASP.NET 04 - Additional Web Server Controls
ASP.NET 04 - Additional Web Server ControlsASP.NET 04 - Additional Web Server Controls
ASP.NET 04 - Additional Web Server ControlsRandy Connolly
 
Accessibility with Single Page Apps
Accessibility with Single Page AppsAccessibility with Single Page Apps
Accessibility with Single Page AppsRoss Mullen
 
03 asp.net session04
03 asp.net session0403 asp.net session04
03 asp.net session04Mani Chaubey
 
High performance coding practices code project
High performance coding practices code projectHigh performance coding practices code project
High performance coding practices code projectPruthvi B Patil
 
Abap objects in action
Abap objects in actionAbap objects in action
Abap objects in actionFaina Fridman
 
ASP.Net Presentation Part1
ASP.Net Presentation Part1ASP.Net Presentation Part1
ASP.Net Presentation Part1Neeraj Mathur
 
13 asp.net session19
13 asp.net session1913 asp.net session19
13 asp.net session19Vivek chan
 
Ajax And Your Cms
Ajax And Your CmsAjax And Your Cms
Ajax And Your Cmsyiditushe
 

Similar to Chapter 25 (20)

Ajax
AjaxAjax
Ajax
 
SynapseIndia dotnet development panel control
SynapseIndia dotnet development panel controlSynapseIndia dotnet development panel control
SynapseIndia dotnet development panel control
 
Ajax and ASP.NET AJAX
Ajax and ASP.NET AJAXAjax and ASP.NET AJAX
Ajax and ASP.NET AJAX
 
Ajax control asp.net
Ajax control asp.netAjax control asp.net
Ajax control asp.net
 
ASP.NET AJAX Basics
ASP.NET AJAX BasicsASP.NET AJAX Basics
ASP.NET AJAX Basics
 
Web forms in ASP.net
Web forms in ASP.netWeb forms in ASP.net
Web forms in ASP.net
 
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
 
Chanhao Jiang And David Wei Presentation Quickling Pagecache
Chanhao Jiang And David Wei Presentation Quickling PagecacheChanhao Jiang And David Wei Presentation Quickling Pagecache
Chanhao Jiang And David Wei Presentation Quickling Pagecache
 
NET_Training.pptx
NET_Training.pptxNET_Training.pptx
NET_Training.pptx
 
ASP.NET 04 - Additional Web Server Controls
ASP.NET 04 - Additional Web Server ControlsASP.NET 04 - Additional Web Server Controls
ASP.NET 04 - Additional Web Server Controls
 
Accessibility with Single Page Apps
Accessibility with Single Page AppsAccessibility with Single Page Apps
Accessibility with Single Page Apps
 
Asp.net control
Asp.net controlAsp.net control
Asp.net control
 
ASP.net.pptx
ASP.net.pptxASP.net.pptx
ASP.net.pptx
 
03 asp.net session04
03 asp.net session0403 asp.net session04
03 asp.net session04
 
High performance coding practices code project
High performance coding practices code projectHigh performance coding practices code project
High performance coding practices code project
 
Abap objects in action
Abap objects in actionAbap objects in action
Abap objects in action
 
ASP.Net Presentation Part1
ASP.Net Presentation Part1ASP.Net Presentation Part1
ASP.Net Presentation Part1
 
SynapseIndia asp.net2.0 ajax Development
SynapseIndia asp.net2.0 ajax DevelopmentSynapseIndia asp.net2.0 ajax Development
SynapseIndia asp.net2.0 ajax Development
 
13 asp.net session19
13 asp.net session1913 asp.net session19
13 asp.net session19
 
Ajax And Your Cms
Ajax And Your CmsAjax And Your Cms
Ajax And Your Cms
 

More from application developer (20)

Chapter 26
Chapter 26Chapter 26
Chapter 26
 
Chapter 23
Chapter 23Chapter 23
Chapter 23
 
Assignment
AssignmentAssignment
Assignment
 
Next step job board (Assignment)
Next step job board (Assignment)Next step job board (Assignment)
Next step job board (Assignment)
 
Chapter 18
Chapter 18Chapter 18
Chapter 18
 
Chapter 17
Chapter 17Chapter 17
Chapter 17
 
Chapter 16
Chapter 16Chapter 16
Chapter 16
 
Week 3 assignment
Week 3 assignmentWeek 3 assignment
Week 3 assignment
 
Chapter 15
Chapter 15Chapter 15
Chapter 15
 
Chapter 14
Chapter 14Chapter 14
Chapter 14
 
Chapter 13
Chapter 13Chapter 13
Chapter 13
 
Chapter 11
Chapter 11Chapter 11
Chapter 11
 
Chapter 10
Chapter 10Chapter 10
Chapter 10
 
C # test paper
C # test paperC # test paper
C # test paper
 
Chapter 9
Chapter 9Chapter 9
Chapter 9
 
Chapter 8 part2
Chapter 8   part2Chapter 8   part2
Chapter 8 part2
 
Chapter 8 part1
Chapter 8   part1Chapter 8   part1
Chapter 8 part1
 
Chapter 7
Chapter 7Chapter 7
Chapter 7
 
Chapter 6
Chapter 6Chapter 6
Chapter 6
 
Chapter 5
Chapter 5Chapter 5
Chapter 5
 

Recently uploaded

Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfFIDO Alliance
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxFIDO Alliance
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdfMuhammad Subhan
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform EngineeringMarcus Vechiato
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераMark Opanasiuk
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandIES VE
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch TuesdayIvanti
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...FIDO Alliance
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...FIDO Alliance
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewDianaGray10
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe中 央社
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxFIDO Alliance
 
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The InsideCollecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The InsideStefan Dietze
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfFIDO Alliance
 
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Paige Cruz
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...FIDO Alliance
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Patrick Viafore
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxFIDO Alliance
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?Mark Billinghurst
 

Recently uploaded (20)

Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptx
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & Ireland
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch Tuesday
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overview
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The InsideCollecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 

Chapter 25

  • 1. • Understanding Ajax • Advantages & Disadvantages of Ajax • The Script Manager • Update Panel • Partial Updates • Conditional Updates • Triggers • Progress Notification • Timed Refreshes • ASP.NET AJAX Control Toolkit
  • 2. Ajax is programming shorthand for a set of techniques that create more responsive, dynamic pages that refresh themselves quickly and flicker-free. One of the hallmarks of Ajax is the ability to refresh part of the page while leaving the rest untouched. Technically, it’s a short form for Asynchronous JavaScript and XML, although this technique is now considered to be just one of several possible characteristics of an Ajax web application.
  • 3. • The key benefit of Ajax is responsiveness because it can react immediately updating the page partially, leaving the unchanged portion untouched • An Ajax application, when done properly, provides a better flicker free experience for the user. • Complexity • Browser Support
  • 4. In order to use ASP.NET AJAX, you need to place the ScriptManager control on your webpage. It adds the links to the ASP.NET AJAX JavaScript libraries. It does that by inserting a script block <script src="/YourWebSite/ScriptResource.axd?d=RUSU1mI ..." type="text/javascript"> </script> ScriptResource.axd is a resource that tells ASP.NET to find a JavaScript file that’s embedded in one of the compiled .NET 4 assemblies. The JavaScript file is only downloaded once, and then cached by the browser so it can be used by various pages in the website.
  • 5. ASP.NET includes a handy control called UpdatePanel that lets you take an ordinary page with server-side logic and make sure it refreshes itself in flicker-free Ajax style using partial updates. The basic idea is that you divide your web page into one or more distinct regions, each of which is wrapped inside an invisible UpdatePanel. When an event occurs in a control that’s located inside an UpdatePanel, and this event would normally trigger a full-page postback, the UpdatePanel intercepts the event and performs an asynchronous callback instead. The only difference is the means of communication (the page uses an asynchronous call to get the new data) and the way the received data is dealt with (the UpdatePanel refreshes its inner content, but the remainder of the page is not changed).
  • 6. 1. The user clicks a button inside an UpdatePanel. 2. The UpdatePanel intercepts the client-side click. Now, ASP.NET AJAX performs a callback to the server instead of a full-page postback. 3. On the server, normal page life cycle executes, with all the usual events. Finally, the page is rendered to HTML and returned to the browser. 4. ASP.NET AJAX receives HTML content for every UpdatePanel on the page. The client-side script code then updates the page, replacing the existing HTML that’s in each panel with the new content. (If a change has occurred to content that’s not inside an UpdatePanel, it’s ignored.)
  • 7. The key technique in an Ajax web application is partial refreshes. With partial refreshes, the entire page doesn’t need to be posted back and refreshed in the browser. The request takes place in the background, so the webpage remains responsive. When the web page receives the response, it updates just the changed portion of the page,
  • 8.
  • 9. In complex pages, you might have more than one UpdatePanel. In this case, when one UpdatePanel triggers an update, all the UpdatePanel regions will be refreshed. In this situation, you can configure the panels to update themselves independently. Simply change the UpdatePanel.UpdateMode property from Always to Conditional. The UpdatePanel will refresh itself only if an event occurs in one of the controls in that UpdatePanel.
  • 10. If you move the controls that fire postback out of the UpdatePanel, their events won’t be intercepted any longer, and they’ll trigger full-page postbacks with the familiar flicker. The solution is to explicitly tell the UpdatePanel to monitor those controls, even though they aren’t inside the UpdatePanel. You can do this by adding triggers to the UpdatePanel. Just select the UpdatePanel, click the Triggers property in the Properties window, and click the ellipsis (...) that appears in the Triggers box. Visual Studio will open a dialog box where you can add as many triggers as you want, and pick the control for each trigger from a drop- down list.
  • 11. <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:Label ID="Label1" runat="server" Font- Bold="True"></asp:Label> <br /> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID=“cmdPostBack" /> </Triggers> </asp:UpdatePanel> <asp:Button ID="cmdPostback" runat="server" Text="Refresh Full Page" />
  • 12. ASP.NET includes UpdateProgress control that allows you to show a message while a time-consuming asynchronous request is under way. The UpdateProgress control works in conjunction with the UpdatePanel. When you add the UpdateProgress control to a page, you get the ability to specify some content that will appear as soon as an asynchronous request is started and disappear as soon as the request is finished. This content can include a fixed message, but many people prefer to use an animated GIF
  • 13. <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <div style="background-color:#FFFFE0;padding: 20px"> <asp:Label ID="lblTime" runat="server" Font- Bold="True"></asp:Label> <br /><br /> <asp:Button ID="cmdRefreshTime" runat="server" OnClick="cmdRefreshTime_Click" Text="Start the Refresh Process" /> </div> </ContentTemplate> </asp:UpdatePanel> <br /> <asp:UpdateProgress ID="updateProgress1" runat="server"> <ProgressTemplate> <div style="font-size: xx-small"> Contacting Server ... <img src="wait.gif" alt="Waiting..." /> </div> </ProgressTemplate> </asp:UpdateProgress>
  • 14. In some situations, you might want to force a full or partial page refresh without waiting for a user action. For example, you might create a page that includes a stock ticker, and you might want to refresh this ticker periodically (say, every five minutes) to ensure it doesn’t become drastically outdated. ASP.NET includes a Timer control that allows you to implement this design easily.
  • 15. <asp:Timer ID="Timer1" runat="server" Interval="60000" /> <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"> <ContentTemplate> ... </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" /> </Triggers> </asp:UpdatePanel>
  • 16. The ASP.NET AJAX Control Toolkit is a joint project between Microsoft and the ASP.NET community. It consists of dozens of controls that use the ASP.NET AJAX libraries to create sophisticated effects. To get the ASP.NET AJAX Control Toolkit, surf to http://www.asp.net/ajaxlibrary/act.ashx. A 6.4 MB ZIP file which is designed for ASP.NET 4 is named AjaxControlToolkit.Binary.NET4.zip. Inside the ZIP file, you’ll find a central assembly named AjaxControlToolkit.dll and a host of smaller satellite assemblies that support localization for different cultures.