SharePoint Wait Page

Using The Microsoft.SharePoint namespace provides the SPLongOperation class you can let the user to see the wait page till the operation gets completed.

As this class implements the IDisposable interface, the best is to use a using statement like in the following example:

void buttonProcess_Click(object sender, EventArgs e)

using (SPLongOperation operation = new SPLongOperation(this.Page))


// Define the url to be redirected after the long operation

string urltoredirect = “http://servername/afterprocessredirectpage.aspx”;

operation.LeadingHTML = “Please wait…”;

operation.TrailingHTML = “Description…”;


//Place here the code that takes a long time to be executed




you can also try

Leave a Reply

Your email address will not be published. Required fields are marked *