.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

How to use SPLongOperation()

Posted By:      Posted Date: October 12, 2010    Points: 0   Category :SharePoint
we have a database configuration page,which ask database server,database name, windows authentication or sql server authentication
and the .mdf and .ldf files.

if the database server,name or id or password in incorrect the page stopped n indicate the
highlight the wrong one. its working fine .. but if i m using Splongoperation so is there any way
to stop operation if database server,name,id or password is incorrect and return back to the
database configuration page and highlight the wrong one.

View Complete Post

More Related Resource Links

Use modal dialog for long running task (SPLongOperation?)


I have created a ribbon button which downloads selected files from a document library to a temporary folder on the server.  I have created a aspx page with code behind that downloads the items upon clicking the ribbon button using ModalDialog.ShowModalDialog(options) from javascript.

What I would like to do is implement the below javascript to call my aspx page which does the actual work, and to use the ShowWaitScreenWithNoClose dialog to provide an indicator ot the user.

1.  How do I close the showWaitScreenWithNoClose dialog from the download.aspx page code behind?

2.  Is there a way to update the message text of ShowWaitScreenWithNoClose dialog so that I can indicate the name of the document being downloaded?

3.  Is there a better way of calling vb/c# code that downloads files (or other processes) while showing the waitscreen dialog?

var options = {

 url: '/_layouts/myRibbonButton/download.aspx?itemIds=' + ids + '&sourceUrl=' + location.href,

 tite: 'Download Documents',

 allowMaximize: false,

 showClose: true,

 width: 1,

 height: 1,


SPlongOperation issue with ie7


When trying to use the SPLongOperation, I have a problem: the spinning wheel page doesn't appear when the code is executed.
 (SPLongOperation opp = new
//my code here

The behavior of the splongoperation page is ok with ie6: the spinning wheel page appears when the begin() code is executed until the end() code is executed.
The behavior is ko with ie7: the spinning wheel appears a few ms before the redirection when the end() code is executed.

Have you any idea of the problem?


PS: he same problem is described in this thread by "Selner" : http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/7d24aecf-d9be-476b-9011-b59767223e4b?prof=required
(smartnavigation is false on my page)

Show the same page after SPLongOperation


Hello all

I found SPLongOperation to be useful while performing time-consuming operations to show the progress bar to the end user very easily. What I'm not impressed with is the requirement of the URL to be passed in SPLongOperation.End() function. Why should i necessarily want to redirect to another page? How can i show the same page after the operation gets completed?

Consider I'm building a dataset and binding to a SPGridView in the page. I want to show the long operation progress bar during the time it takes to bind the data in the grid. Now in SPLongOperation.End() if I've to pass a URL how can I show the grid?

Any ideas?

Visit SharePoint User group - India
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend