Ajax Feature in ASP
Ajax Feature in ASP
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 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.
Timer
Script Manager
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:
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
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:
Asynchronous processing
Multi-browser support
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.
……..THANK YOU!