Article Directory
I. Overview
Ajax
The contrast with the traditional development model, click me!
Microsoft
In ASP.NET框架
created on the basis of ASP.NET Ajax
technology to implement Ajax functionality. It is integrated in the ASP.NET 2.0及以上
version, it is ASP.NET
an extension of technology.
So, in the ASP.NET
well of Ajax
the package, defined by the respective control it has become, in which Visual Studio
the toolbox in the development environment of Ajax
extensions which, as shown below:
Because they all belong to the server control, so they should be defined <form>
under the label, the label format is as follows:
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
</div>
</form>
Second, how to use
These controls are in use with certain rules, for example, in order to achieve ASP,NET Ajax
all the features, you must include in a page ScriptManager
control.
1, ScriptManager control
It is used to generate relevant client proxy script ( JavaScript
), in order to be able to support access Web服务
, its label is defined as follows:
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
A aspx page can have only one ScriptManager
control
2, UpdatePanel controls
For updating the content on the page, the page needs to update the local content area must be placed UpdatePanel
within the control, which is defined as the main area and updating the update mode, its label is defined as follows:
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate></ContentTemplate>
<Triggers></Triggers>
</asp:UpdatePanel>
Among them, ContentTemplate
and Triggers
for the UpdatePanel
sub-elements of the control
3, ScriptManagerProxy controls
Functions and ScriptManager
controls the same, only applies to master pages and content pages also need Ajax
time to distinguish between use of partial update.
Tags are defined as follows:
<asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server"></asp:ScriptManagerProxy>
4, Timer controls
Implement refresh functionality in the specified time interval, its label is defined as follows:
<asp:Timer ID="Timer1" runat="server" Interval="1000"></asp:Timer>
Wherein Interval属性
when Timer
the key represents a time interval, in milliseconds,
5, UpdateProgress control
Used when performing asynchronous page is updated to show the execution status information, which can be text, pictures can be. In this way, you can achieve when updating data, a progress bar effect, give the user a better experience. Its label is defined as follows:
<asp:UpdateProgress ID="UpdateProgress1" runat="server"></asp:UpdateProgress>