Tuesday, July 17, 2012

How to implement Progress page in our custom pages?

To implement progress page in our custom application pages which looks like a SharePoint progress page use the following code snippet.

using (SPLongOperation operation = new SPLongOperation(this.Page))
{
operation.LeadingHTML = "Wait for some time to finish this process";
operation.Begin();

//Here we need to implement our business logic which takes long time

operation.End(Redirect URL)

//catch the following exception no need to handle

catch (ThreadAbortException)
{
}

No comments:

Post a Comment