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