I have this API client which has a send method used to post my object to a Web API service and return an object of type ReturnedResults. Now I need to run this post method in an ASP.net page_load event. I have seen similar examples here, however what I need is to get my return object from my async method.
I know that I am supposed to use
PageAsyncTask t = new PageAsyncTask(APIService.Send("test"));
However I have two problems, first PageAsyncTask doesn't accept my Send method as a valid Task type, I guess that's because my method returns a Task of Task type so it complains that it can't convert Task to System.Func
Also how can I get my object of ReturnedResults out of this once it is successfully executed?