Initial knowledge of ASP. NET AJAX

Source: Internet
Author: User

        asp.net AJAX technology is a technology to implement asynchronous network applications, it is integrated in the asp.net2.0 asp.net asp.net AJAX Technology developers can add web server control and client script are combined and implemented on this basis web page of the local update function. Therefore, when the browser interacts with the server, asp.net AJAX technology can render a portion of the browser content, thus avoiding the submission of the entire browser content to the server.

AJAXis aasynchronous JavaScript and XML(AsynchronousJavaScriptand theXML) is abbreviated. It is a web development technique for creating interactive Web applications. In theAjaxin whichXMLHttpRequestis the core of its technology. It is in the pageJavaScriptscripts provide a way of communicating so that pages can interact with the server through these scripts. In the pageJavaScriptThe script can interact with the server without refreshing the page-that is, the page can fetch data from the server or submit data to the server. Ajaxtechnology and the traditionalWebcompared to the technology, there3A major difference:

    • Ability to update parts of the page without having to refresh the entire page to communicate with the server.
    • The direct communication between the page and the server can use asynchronous operations, thus eliminating the need to interrupt the user's actions, allowing the page to react more quickly.
    • Because of the page and server interaction, only a portion of the page is needed, thus reducing the amount of page-to-server traffic and improving the efficiency of the application.

asp.net AJAX asp.net AJAX The server-side section provides a 5 server-side controls. These controls enable developers to easily implement asynchronous Web pages and a non-flush web environment. 5 A server-side control is described as follows:

      scriptmanager " Span lang= "ZH-CN" style= "font-family: Song body; Font-size:16.0pt ">" Control: Manage page Scripts (one page has only one, and is placed before the managed control).
      scriptmanagerproxy controls: scripts for managing pages. (When a page or control is embedded in another page or master, the control, so this page should use scriptmanagerproxy control)
      updatepanel " Span lang= "ZH-CN" style= "font-family: Song body; Font-size:16.0pt ">" control: and scriptmanager controls together provide a non-flush web environment. (partial update)
    • Timer control: Called a timer, it is able to trigger user-defined actions on a timed basis.
    • UpdateProgress control: The process of displaying an entire or partial page update.

ASP . NET AJAX the server-side architecture looks like this:

ASP . NET AJAX the client architecture looks like this:

Here is the use case:

Using UpdatePanel to implement partial updates

<asp:scriptmanagerid= "ScriptManager1" runat= "Server" ></asp:scriptmanager><asp:updatepanelid= "                                        UpdatePanel2 "runat=" Server > <ContentTemplate> <divstyle= "vertical-align:central; Text-align:center; width:400px; Float:left; padding:0 400px; "runat =" server "id=" Divsearch "> <div style=" Float:left " > <asp:radiobutton id= "RadioButton1" runat= "server" groupname= "reader"                                           cssclass= "MyRadio" text= "reader Account" checked= "true"/> </div> <%--<label style= "FONT-SIZE:13PX; font-weight:500; Color:blue; Width:auto; Float:left; padding-top:5px "> Reader account </label>--%>    &lt ;d ivstyle= "Float:left; width:80px; "                         >         <asp:radiobutton id= "RadioButton2" runat= "server" groupname= "reader" cssclass= "MyRadio" text= "Reader name"/> </div> <input runat= "Server" id= "Txtreader" type = "text" placeholder= "Please enter your account or password"/>  <asp:bu Tton runat= "Server" text= "query" id= "Btnquery" onclick= "Btnquery_click" causesvalidation= "false" ></asp:button                               > </div> </ContentTemplate> </asp:UpdatePanel>


Add:

ASP. NET AJAX Control Toolkit is in ASP . NET AJAX built on the basis of dozens of types of ASP . NET AJAX environment to run the controls, if necessary, you can download from the Internet.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Initial knowledge of ASP. NET AJAX

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.