I'm using an AppPage showed up in a ModalDialog and when I click on a button action I try to start a SPLongOperation process, but it only shows the processing panel right before it ends.
here is the code:
protected void CustomBtnClick(object sender, EventArgs e)
{
try
{
SPLongOperation.BeginOperation beginOperation = delegate(SPLongOperation operation)
{
operation.LeadingHTML = "Please wait while the operation is running.";
operation.TrailingHTML = "Running stuff that takes time.";
operation.Begin();
//My Long Operation Code
operation.EndScript("window.frameElement.commitPopup();");
};
SPLongOperation.Begin(beginOperation);
}
catch (ThreadAbortException) {/* Thrown when redirected */}
catch (Exception ex)
{
SPUtility.TransferToErrorPage(ex.ToString());
}
}
the prime idea is to lock the app page and then give back some feedback messages.
any correction or alternative approach is welcome!
spregards