开发者

Asycnchronous call from a Webpart Button Control in MOSS 2007

开发者 https://www.devze.com 2023-03-06 01:51 出处:网络
I have a web part in Moss 2007 that iterates through a given list using the Sharepoint API, and sets the field value to some predetermined value.Basically bulk editing a list.

I have a web part in Moss 2007 that iterates through a given list using the Sharepoint API, and sets the field value to some predetermined value. Basically bulk editing a list.

For small lists, the web part works great. 开发者_运维知识库But when I am dealing with list that have a large amount of items, I get an internal error, or a request timeout.

Is there a way that I can click on the button, and have in the background Asynchronously perform the actions, so that the submitter doesn't have to wait for operation to complete, or can get the post back later?

How would I do this? Thanks in advance, need all the help i cant get.

PS. There is no .aspx page in project, just a straight up class that has createchildcontrols and other functions.

PSS. I have very little control over and web.config or anything of that matter on the server itself


Can you build a custom timer job that performs the bulk editing, and the web part would just add items for the timer job to process.

If you can deploy a web service to the farm you could re-write your web part to use AJAX to call into the web service to perform the work.

Another option would be to have your web part spawn background threads, but I would be very wary of this option. Not only is managing threads difficult, but they will be running in SharePoint's IIS worker process thus increasing the opportunity for your web part to bring down the site.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号