I want to use jquery.ajax to retrieve some data from the server in a asp.net mvc application.
I am looking for a way to send back (server to client) more than one item
what can i do on the asp.net mvc side to include more items in the result
function AjaxSucceeded(result) {
in suach a way that they can be used easily in javascript code?
When you are serializing a list, it’s JSON-representation is also a list. Consider this example:
This method will return the following JSON:
Which is easily enumerable in JavaScript:
The JSON serializer can of course handle complex objects.