Solved

Sharepoint SPLongOperation

Posted on 2014-10-07
1
386 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
Comment Utility
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

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Last week I faced a strange issue recently, i have deployed SharePoint 2003 servers for one project and one of the requirements was to open SharePoint site from same server. when i was trying to open site from the same server i was getting authentic…
The vision: A MegaMenu for a SharePoint portal home page The mission: Make it easy to maintain. Allow rich content and sub headers as well as standard links. Factor in frequent changes without involving developers or a lengthy Dev/Test/Prod rel…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

772 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now