0% found this document useful (0 votes)
189 views

Ajax Feature in ASP

This document provides an overview of AJAX features used in ASP.NET. It discusses the Timer control, Script Manager control, Script Manager Proxy control, Update Progress control, and Update Panel control. The Timer control allows setting intervals to refresh a web page. The Script Manager control manages scripts for AJAX-enabled pages. The Update Progress control displays progress for partial page updates. The Update Panel control facilitates updating only portions of a web page. In addition, it covers the pros of AJAX like improved user experience and reduced server loads, as well as cons such as increased debugging difficulties and dependency on JavaScript.

Uploaded by

Manasvi Mehta
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
189 views

Ajax Feature in ASP

This document provides an overview of AJAX features used in ASP.NET. It discusses the Timer control, Script Manager control, Script Manager Proxy control, Update Progress control, and Update Panel control. The Timer control allows setting intervals to refresh a web page. The Script Manager control manages scripts for AJAX-enabled pages. The Update Progress control displays progress for partial page updates. The Update Panel control facilitates updating only portions of a web page. In addition, it covers the pros of AJAX like improved user experience and reduced server loads, as well as cons such as increased debugging difficulties and dependency on JavaScript.

Uploaded by

Manasvi Mehta
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 14

A PRESENTATION

ON
AJAX FEATURE USED IN ASP.NET

PRESENTED BY:-

Manasvi Mehta
BCA 16
0800818093
INTRODUCTION TO AJAX
(ASYNCHRONOUS JAVA SCRIPT AND XML)
AJAX is a technology that can reduce web page post backs significantly and yield
(give) better response time for your web application.

AJAX is a combination of following technologies –

• XML HTTP request object


• JAVA script
• DHTML
• DOM
• XML

AJAX uses the XML HTTP request object that can communicate directly with web
server to retrieve data without need to reload the web page each time data is
requested.

It builds light and fast web applications with improve response time.
ASP.net 2.0 server development platform is now integrated with the client side
libraries. That incorporates cross browser JAVA script and DHTML technologies.

AJAX is technology with cross platform, cross architecture and even cross
browser support.

We can use AJAX in any browser for example Internet explorer, Mozilla, Firefox
and so on.

 Ajax is a technology; it is not specific


to ASP.NET or Java. You can use Ajax in both of the preceding technologies.
AJAX FEATURE USES IN ASP.NET
(AJAX EXTENSION)

 Timer

 Script Manager

 Script Manager Proxy


 Update Progress
 Update Panel
Let’s take a brief look at what each of these controls relates to.
 The Timer Control—Setting Intervals
Using the Timer control, you can set a timer for your web page. You can ensure that

the web page can post back to the web server after a specified interval of time. You

can use the Interval property of this control to set an interval in milliseconds, after

which the web page will refresh itself. Once this interval elapses, the control fires a

post back to the web server. This is how the mark-up code of a typical Timer control

looks:

<asp: Timer ID=”Timer1” runat=”server” Interval=”5000”


OnTick=”My Method” />
The Script Manager Control—The Brain of an
Ajax-Enabled Web Page

The Script Manager control is a part of the System.Web.UI namespace and is the
brain of an Ajax-enabled ASP.NET web page. As the name implies, it is responsible
for managing scripts and registering them as and when required; it is also
instrumental in partial web page rendering in your Ajax-enabled ASP.NET web
applications.

When there is a need to update the web page, this control would run through all
the Update Panel controls in your web page, initiate a trigger, and update the
required portions of the web page.

The Script Manager control is an invisible control, and you should include this
control in your web page prior to including any other Ajax-enabled control.
Moreover, you can have only one instance of a Script Manager control in your
web page.
The Script Manager Proxy Control—Adding Scripts and
Services
The documentation at the ASP.NET Ajax site states, “Script Manager Proxy control
enables you to add scripts and services that are specific to nested components.” Note
that you can use this control only to add scripts or services that have been predefined
by the Script Manager control. However, you cannot remove these scripts
using this control. In other words, you can use this control to add scripts and services
to your web page, which already has a Script Manager control inside.

You should have a Script Manager control in a web page that has a
Script Manager Proxy control, or else an Invalid Operation Exception will be
thrown when you try to access the Script Manager Proxy control.
 The Update Progress Control—Displaying Progress
Status During Partial Updates
The Update Progress control can be used to display the progress status when using

partial-page rendering in an Ajax-enabled ASP.NET web page. You can use this control,

together with the Update Panel control, to display the status of partial page

updates in an asynchronous mode of operation to the user in an Ajax-enabled web

application.
 The Update Panel Control—Facilitating Partial Page
Updates

The Update Panel control included as a part of the Ajax server extensions framework
is used to update only a specified portion of the web page. This feature is what
is commonly known as partial-web page rendering. In other words, you can eliminate
the need to refresh the entire web page using this feature for improved performance
and better responsiveness.

 Partial-web page rendering is a feature that allows you to specify portions of your
web page that would be updated to eliminate the need for the entire page being
posted back to the web server, and thus boost the application’s performance. With
this feature, you can easily define the “updatable” portions of your web page and
make way for asynchronous calls. “Partial page rendering removes the need for the
whole page to be refreshed as the result of a post back. Instead, only individual
regions of the page that have changed are updated. As a result, users do not see the
whole page reload with every post back , which makes user interaction with the web
page more seamless”.
The Pros and Cons of Using Ajax
Some of the many benefits of using Ajax in web-based applications include
the following:

 Improved user experience

 Asynchronous processing

 Reduced server hits and network load

 Platform and architecture neutrality

 Multi-browser support

 Faster page renders and improved response times


The Downsides of Using Ajax
Now let’s discuss the drawbacks of using Ajax or, more precisely, areas where
Ajax can fit and those where it can’t. Although Ajax comes with a lot of
advantages, there are quite a few downsides to using Ajax in your web
applications. The major drawback is its massive usage and dependency on
JavaScript. It should be noted that JavaScript is implemented differently for
various browsers, such as Internet
Explorer, Netscape, Mozilla, and so on. This becomes a constraint especially
when you need to make Ajax work across browsers.

Added to this, you do not have support for JavaScript in mobile browsers. So,
taking
Ajax’s dependency on JavaScript into consideration, Ajax might not be well
suited
for designing mobile applications.
Usage of Ajax makes your web page difficult to debug, increases the code
size of your web page, and makes your web page prone to potential security
threats.

Moreover, its usage—and the asynchronous operations there after—tend to


increase the load on the web server. When using Ajax, making your
application cross browser compliant is rather difficult (although not
impossible, of course), and the Back button of your web browser does not
work.

……..THANK YOU!

You might also like