<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Long-running operation in a wizard page</title>
	<atom:link href="http://urbas.tk/index.php/2008/08/05/long-running-operation-in-a-wizard-page/feed/" rel="self" type="application/rss+xml" />
	<link>http://urbas.tk/index.php/2008/08/05/long-running-operation-in-a-wizard-page/</link>
	<description>Radoslaw H. Urbas homepage / blog</description>
	<lastBuildDate>Mon, 28 Nov 2011 15:23:40 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Seb</title>
		<link>http://urbas.tk/index.php/2008/08/05/long-running-operation-in-a-wizard-page/comment-page-1/#comment-17435</link>
		<dc:creator>Seb</dc:creator>
		<pubDate>Sat, 09 Apr 2011 15:08:18 +0000</pubDate>
		<guid isPermaLink="false">http://urbas.tk/?p=40#comment-17435</guid>
		<description>It seems that to display the wizard progress monitor control you also have to call :

((Wizard) getWizard()).setNeedsProgressMonitor(true);</description>
		<content:encoded><![CDATA[<p>It seems that to display the wizard progress monitor control you also have to call :</p>
<p>((Wizard) getWizard()).setNeedsProgressMonitor(true);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Velvet Wine Bags</title>
		<link>http://urbas.tk/index.php/2008/08/05/long-running-operation-in-a-wizard-page/comment-page-1/#comment-14187</link>
		<dc:creator>Velvet Wine Bags</dc:creator>
		<pubDate>Fri, 20 Aug 2010 16:19:48 +0000</pubDate>
		<guid isPermaLink="false">http://urbas.tk/?p=40#comment-14187</guid>
		<description>Ever woundered how microsoft create the nice longrunning process windows works in SharePoint 2007?

SPLongOperation is the class to use. It has 2 important methods

Begin and End;

All your code that runs for a long time is placed between begin and end.

Below is a sample class.

It is almost to simple and just works :-)
 

using System;
using System.Web;
using System.Web.UI.WebControls;
using Microsoft.SharePoint;
namespace CreateLongOperation
{
   public class LongRun : System.Web.UI.Page
   {
      protected Button buttonOk;
   
      protected void Page_Load(object sender, EventArgs e)
      {
         buttonOk.Click += new EventHandler(buttonOk_Click);
      }
   
      void buttonOk_Click(object sender, EventArgs e)
      {
         SPLongOperation operation = new SPLongOperation(this.Page);
   
         operation.Begin();
   
         // do long operation code here...
         System.Threading.Thread.Sleep(6000);
      
         operation.End(&quot;http://sps/_layouts/Mynewpage.aspx&quot;);
      }
   }
}</description>
		<content:encoded><![CDATA[<p>Ever woundered how microsoft create the nice longrunning process windows works in SharePoint 2007?</p>
<p>SPLongOperation is the class to use. It has 2 important methods</p>
<p>Begin and End;</p>
<p>All your code that runs for a long time is placed between begin and end.</p>
<p>Below is a sample class.</p>
<p>It is almost to simple and just works <img src='http://urbas.tk/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>using System;<br />
using System.Web;<br />
using System.Web.UI.WebControls;<br />
using Microsoft.SharePoint;<br />
namespace CreateLongOperation<br />
{<br />
   public class LongRun : System.Web.UI.Page<br />
   {<br />
      protected Button buttonOk;</p>
<p>      protected void Page_Load(object sender, EventArgs e)<br />
      {<br />
         buttonOk.Click += new EventHandler(buttonOk_Click);<br />
      }</p>
<p>      void buttonOk_Click(object sender, EventArgs e)<br />
      {<br />
         SPLongOperation operation = new SPLongOperation(this.Page);</p>
<p>         operation.Begin();</p>
<p>         // do long operation code here&#8230;<br />
         System.Threading.Thread.Sleep(6000);</p>
<p>         operation.End(&#8220;http://sps/_layouts/Mynewpage.aspx&#8221;);<br />
      }<br />
   }<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SeB</title>
		<link>http://urbas.tk/index.php/2008/08/05/long-running-operation-in-a-wizard-page/comment-page-1/#comment-1554</link>
		<dc:creator>SeB</dc:creator>
		<pubDate>Tue, 10 Mar 2009 00:07:47 +0000</pubDate>
		<guid isPermaLink="false">http://urbas.tk/?p=40#comment-1554</guid>
		<description>Do you think it would be easilly possible while the long job is running to add a button or change the grayed &quot;finish&quot; button by a &quot;Run in background&quot; button dyanmically. If this button where clicked then the wizard dialog box would be reduced in the job bar like a Job and bring the wizard back again to show next page for instance when the long task is over ?
SeB.</description>
		<content:encoded><![CDATA[<p>Do you think it would be easilly possible while the long job is running to add a button or change the grayed &#8220;finish&#8221; button by a &#8220;Run in background&#8221; button dyanmically. If this button where clicked then the wizard dialog box would be reduced in the job bar like a Job and bring the wizard back again to show next page for instance when the long task is over ?<br />
SeB.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

