Solved

Sharepoint SPLongOperation

Posted on 2014-10-07
1
394 Views
Last Modified: 2014-10-13
I have a page with a dropdown, once you choose a value a report runs and comes back in a Gridview.  The data takes about 11 or 12 seconds to run and I want to put up some kind of wait, so I found and tried to use SPLongOperation.  The code below shoes the wait page, but then returns to the page without the data.  I think this is because I do not understand what the last line is doing.  Why does the End method of SPLongOperation require a redirect ?  I do not want to redirect, I want to stay, after the data is retrieved.

    protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
      {
      using (SPLongOperation longOperation = new SPLongOperation(this.Page))
        {
        //Custom Messages on the Spinning Wheel Screen
        longOperation.LeadingHTML = "Provisioning Sites";
        longOperation.TrailingHTML = "Please wait while the sites are being provisioned.";

        //Start the long operation
        longOperation.Begin();

        //Your Long Operation Code Goes Here...
        Button1.Visible = true;

        //End the long operation
        string redirectURL = SPContext.Current.Web.Url + "/SitePages/Report.aspx";
        longOperation.End(redirectURL, SPRedirectFlags.Trusted, HttpContext.Current, "");
        }
      }
0
Comment
Question by:Demosthenes
1 Comment
 
LVL 8

Accepted Solution

by:
Jayaraja Jayaraman earned 500 total points
ID: 40377292
splong operation are intended to spin and bring back with refershed data which is nothing but it will do a post back. in literal words in your case atleast you shouldnt be using splongrun , you should try jquery spservices for wait and show browsing wheel.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The Scenario: Let’s say you have a quote worksheet in Excel that you use to work up sales figures and such for your clients. You utilize SharePoint to manage and keep track of these documents. You would like values from your worksheet to populate Sh…
I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question