How to return a dataset to the client Javascript

Source: Internet
Author: User

In the previous blog, I introduced how to return a able to JavaScript for access,

On the basis of the previous one, this time is used to complete how to return a dataset from WebService,

For JavaScript on the client side,

Obviously, dataset is more complex than datatable,

Since datatable will generate loop reference exceptions during JSON serialization,

Dataset is a larger set composed of datatable and some structures or relationships,

Therefore, dataset cannot be directly transmitted to the Javascript client.

How can this problem be solved?

Still follow the Method for Solving datatable last time,

The dataset is indirectly transmitted to JavaScript.

Let's take a look at the example (please note the notes and the introduction of the previous blog)

First look at the WebServiceCode:

Check whether the class demo _ 10 _ use _ converter is

How to convert a able to a custom class type

The next step is to see how to use JavaScript to pass in on the client.

Multi-list generic set and dictionary Object Parsing

Check the results.

All of the above is the content of this example,

This requirement requires a certain understanding of Ajax,

At the same time, you must have a certain understanding of generic and centralized server types supported in JSON format,

At the same time, we also need to know about the performance of the server types supported by JSON in the client.

If you have any questions, you can view my previousArticle,

The content is clearly written and easy to understand.

2010-1-27

 

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.