'How do I' create a long running operation page (gears page)?
This one is an awesome feature to add if you've got an application running a workflow asynchronously and on-the-fly (see post on programmatically launching a workflow) and you want to coordinate the results of said workflow synchronously, so.you have to wait for the workflow to complete.
Check out Microsoft.SharePoint.SPLongOperation. This object allows you to begin and complete the long operation quite easily.
SPLongOperation operation = new SPLongOperation(this) { LeadingHTML = "This is a bold description of my operation", TrailingHTML = "This is a normal sub-description of my operation"};operation.Begin();Thread.Sleep(5000);operation.End("/redirectpage.aspx");
Comments
Anonymous
January 25, 2009
PingBack from http://blog.a-foton.ru/index.php/2009/01/25/how-do-i-create-a-long-running-operation-page-gears-page/Anonymous
February 26, 2010
I think you just saved me almost 2 days of work. I didn't know about SPLongOperation. Thank you!