asp.net - WebMethod return values in JSON format -
How do I return the client back in the JSON format from Webmethod?
There are two stable int values that I want to return. Do I need to create a new object with those 2 properties and return it? The GetStatus () method is often called and I do not like the idea of creating special objects for Jason formatting every time ...
I capture the return value on the client side:
protected on the function (results, user context, filename) (Pageithm. GateStats (I go with an object;);
What do you do with this Fits with the requirement If you have two return values, then you have to put them together structured.
StatusResult of public class {public A complete completion process; Receive the public status GetStatus () {int, the process operation, the total of operation process; //Status.Lock.EnterReadLock (); The procedure procedure = 5; The status process = total; 1; // Static field var result = New status result (result); result.progress process = status process; result. = Status process total; return result;}
Comments
Post a Comment