Microsoft Ajax Solutions

Source: Internet
Author: User

--------Microsoft Ajax Solutions (*)--------
Asp. NET built-in controls for simplifying Ajax development UpdatePanel
Put ScriptManager, the controls that will implement the Ajax effect into the UpdatePanel
UpdatePanel principle exploration, with HttpWatch
Only the parts that need no refresh updates are placed in the UpdatePanel
UpdatePanel is used to achieve some of the requirements of low performance requirements are very convenient
Timer to implement the timing Ajax effect, interval set the time interval, put in UpdatePanel inside
UpdateProgress "Loading Data" is displayed
Introduction to AJAX Toolkit

--------WCF simplifies Ajax (*)---------

Development steps:
Add a Web project, create new item in Web project → web → "ajax Enabled
WCF Service (2008 in the "C #" root category) page, drag and drop the ScriptManager control, ScriptManager's services genus
Added, the Path property is set to the service path, such as "~/service1.svc" when invoking the service-side method
Service1.dowork (ondoworksucceed,ondoworkfailed), Service1 is the service class name, DoWork is the method name,
Ondoworksucceed is the function that is called back when the call succeeds (the delegate in JavaScript), ondoworkfailed is the call failure
The function that is called when the callback occurs. Two functions have one parameter result, the result value of the successful function is the function return value, the failure letter
The result value of the number is an error message. The call is asynchronous. Note that this is the JavaScript code!

Note "~service1.svc" is added to the ScriptManager's Services property, not the scripts attribute. If you write JavaScript
Do not automatically prompt, turn off the ASPX and then open the line. If it doesn't work, write it manually.

The server can also return complex objects, and the JS side can read the field values of complex objects directly from result.

Microsoft Ajax Solutions

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.