DataTable Webmethod only works with thread.sleep
I'm trying to serialize a DataTable return to use on a WebMethod its just
simple like that:
DataTable dtResult = Occurrences.Search(....);
The thing is, if I, immediatly type
return dtResult.Rows.Count.ToString();
It will return "0".
But if i add just after the first line:
System.Threading.Thread.Sleep(2000);
Everything works fine and the row count is 2.
Since when DataTable fetching is asynchronous?
No comments:
Post a Comment