これまでのところ、microsoftが素晴らしいlongrunningプロセスウィンドウを作成する方法は、SharePoint 2007で機能しますか?
SPLongOperationは使用するクラスです。それは2つの重要なメソッドを持っています
開始と終了;
長い間実行されるすべてのコードは、beginとendの間に配置されます。
以下はサンプルクラスです。
それは簡単にほとんどで、ちょうどあなたのソリューション、ラースを共有するため:-)
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("http://sps/_layouts/Mynewpage.aspx");
}
}
}
おかげで動作します。私はおそらく出版インフラストラクチャオプションを利用しています。それは、私たちが利用できる最もコストの低いオプションであるからです。 –