I'm trying to use SPLongOperation in my long running code but it gets start just before the end. Here is my code,
try
{
SPLongOperation.Begin(
"Processing data",
"Please wait it will take few seconds",
delegate(SPLongOperation longOp)
{
try
{
CustomHeader mainHeader = gatherData("Completed");
mainHeader.Processdata(args1,args2,args3)
string redirectURL = "./Confirmation.aspx?q=c";
longOp.End(redirectURL);
}
catch (System.Threading.ThreadAbortException) { /* thrown when redirected */ }
catch (Exception ex)
{
}
});
}
catch (System.Threading.ThreadAbortException) { /* thrown when redirected */ }
catch (Exception ex)
{
}