ASP.NET displaying multiple server side events to browser

  • Thread starter Thread starter Andrew Stokes
  • Start date Start date
A

Andrew Stokes

Hi

I have a usercontrol which contains ajax toolkit controls which I am using
in a SharePoint siite. When the user clicks one of the buttons on the page
it fires a series of events server side (creates a new project in project
server, creates an new SharePoint site ... ) each of which take quite some
time. I would like to display the successful completion of each event in the
control to so the user can see what progress has been made.

I am struggling to understand how I can engineer the page to perform each
task in turn, post the page back after each task has occurred (to update the
UI that the task has been done) then fire the next server side event. It's
easy to update a control with the status changes but the updated control is
only displayed to the user when all of the server side events have completed.

Can anyone help me with this?


Regards

Andrew
 
many options:

1) poll the server for updates
2) open an xmlhttprequest and keep an open connection until some event
occurs. you can suspend and revive the calling thread on your server side
3) use a java/flash/usercontrol/activex control on your page capable of
grabbing these events from your server

I'd take option 2
 
K said:
many options:

1) poll the server for updates
2) open an xmlhttprequest and keep an open connection until some event
occurs. you can suspend and revive the calling thread on your server side
3) use a java/flash/usercontrol/activex control on your page capable of
grabbing these events from your server

I'd take option 2

Would stating a new thread (with a callback) for each step work? The call
back changes the status of a text box, which is inside an update panel. Or
would the page simply run all the threads in one post back?

Marc
 
Back
Top