Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Sharepoint SPLongOperation

Posted on 2014-10-07
1
Medium Priority
?
419 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 8

Accepted Solution

by:
Jayaraja Jayaraman earned 2000 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

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

If you create your solutions on SharePoint sooner or later you will come upon a request to set  permissions of the item depending on some of the item's meta-data - the author, people assigned as approvers, divisions, categories etc. The most natu…
Pimping Sharepoint 2007 without Server-Side Code Part 1 One of my biggest frustrations with Sharepoint 2007 in the corporate world is that while good-intentioned managers lock down the more interesting capabilities of Sharepoint programming in…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

719 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