Solved

Sharepoint SPLongOperation

Posted on 2014-10-07
1
401 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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

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…
For SharePoint sites, particularly public-facing ones, there are times when adding JavaScript, Meta Tags, CSS Styles or other content to the page <head> section is more practical than modifying master pages.  For instance, you could add the jQuery l…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

830 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