Skip to content

Instantly share code, notes, and snippets.

@herskinduk
Created October 23, 2015 22:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save herskinduk/b2e78cbb93c75b78c4b5 to your computer and use it in GitHub Desktop.
Save herskinduk/b2e78cbb93c75b78c4b5 to your computer and use it in GitHub Desktop.
// Use the async execute
var asyncController = controller as IAsyncController;
Task.Factory.FromAsync(asyncController.BeginExecute, asyncController.EndExecute, PageContext.Current.RequestContext, null).Wait();
// The old way (sync)
//(controller as IController).Execute(PageContext.Current.RequestContext);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment