For more information, see JqueryAjax asynchronous processing of Json data.

Source: Internet
Author: User
What is asynchronous or Ajax. let's not talk about XMLHTTPRequest. in general, Asynchronization means that javascript on the front page can call the background method. in this way, there is no refresh. the so-called Ajax. here we will talk about two methods.
Method 1: (Microsoft has its own Ajax Framework)
In Asp.net, Microsoft has its own Ajax framework. This is to introduce the using System. Web. Services space in the page background. cs file and then define the static method (add [WebMethod] before the method).
[WebMethod]
Public static string ABC (string ABC)
{
Return ABC;
}
Now let's talk about how front-end Js processes the data returned by the backend. Jquery can be used to process the returned pure html, json, Xml, and other data. here we will demonstrate that the returned data includes string, set (List <>), and class.
But they all return the Json format (Json is lightweight and easier to process than XML). Let's see how the front-end parses the data.
The Code is as follows:
Front-end page:

<% @ Page Language = "C #" AutoEventWireup = "true" CodeFile = "Default2.aspx. cs" Inherits = "Default2" %>   No title page  
Related Article

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.