Ajax is an abbreviation for asynchronous JavaScript and XML (asynchronous JavaScript and XML technology), which is made up of JavaScript scripting languages, CSS stylesheets, XMLHttpRequest Data Interchange objects, and DOM document objects (Xmldom object) and many other technologies.
A collection of technologies used by a type of Web application that delivers a rich user experience with less response time. It can implement asynchronous transfer and no refresh function.
Advantages:
Enables local refresh of web pages
Asynchronous processing. Web page requests to the server will use asynchronous processing, which means that the processing of the server does not interrupt the user's actions, which improves responsiveness and gives the user a better experience.
Provides cross-browser compatibility support
A large number of built-in client controls for easier JavaScript functionality and special effects
ASP. NET AJAX server Control
ScriptManager Script Management controls
The ScriptManager control is responsible for managing all AJAX server controls on the current page and is the core of Ajax. With the ScriptManager control, it is possible for page local refresh to work. All to use AJAX, each page must have a ScriptManager control. And there is only one.
Use the <Scripts> tag to map script resources in ScriptManager. Introducing Web Service with <Services> tags
<scripts><asp:scriptreference path= "~/script.js"/</scripts>
UpdatePanel Local Update controls
Property:
Place controls, HTML code, and so on in ContentTemplate. This control, code can be updated locally, will not update the entire page.
UpdateMode a total of two modes: Always and conditional,always after each postback, UpdatePanel will be updated, and conditional only for specific circumstances only update.
When there are multiple UpdatePanel in the page, setting to conditional can avoid the effects of each other.
Partial updates can be implemented in UpdatePanel, and local updates can also be triggered outside. Use the Triggers property. Triggers contains two types of triggers: one is Asyncpostbacktrigger, which is used to raise a local update, and another postbacktrigger to throw a full-page loopback. Set the ControlID property and the EventName property in the behavior to set the ID and event for the corresponding control.
<asp:scriptmanager id="ScriptManager1"runat="Server"></asp:ScriptManager> <asp:updatepanel id="UpdatePanel1"runat="Server"> <ContentTemplate> <asp:label id="Label1"runat="Server"text="Label"></asp:Label> <asp:timer id="Timer1"runat="Server"Interval=" +"ontick="Timer1_Tick"></asp:Timer> </ContentTemplate> </asp:UpdatePanel>
Timer timer controls are used to execute a piece of code on a timed
Interval property
Time interval
The Tick event that executes the code.
Getting Started with ASP.