I&#039;ve got a admin page which allows my users to run lots of scripts to generate static pages from our database. The page though can take an age to finish when its handed alot of pages to generate and the whole time the user gets nothing to see.<BR><BR>I want to just run the I/O stuff async in the thread pool. After the jobs have been added to the threadpool I want the page to return to the user and all the jobs just occur in the back ground.<BR><BR>In my .aspx page I&#039;ve got the following code :<BR><BR>// Class that holds all the info about the job<BR>jobListItem x;<BR><BR>// Cycle through my Collection of jobs generated earlier<BR>while ( jobs.jobCollection.Count &#062; 0 )<BR>{<BR>x = (jobListItem) jobs.jobCollection.Pop();<BR>// Add each of the jobs to the threadpool queue<BR>ThreadPool.QueueUserWorkItem( new WaitCallback( jobCallback ), x );<BR>runJob( x );<BR>}<BR><BR>// Sleep for a minute to give the threadpool chance to start up<BR>Thread.Sleep(1000);<BR>}<BR>}<BR><BR>public void runJob( object o )<BR>{<BR>try <BR>{<BR>// Create a new jobRunner to use the info stored in each jobListItem<BR>JobRunner runner = new JobRunner( (jobListItem) o, doGenerate, doUpload, _ConfigXML.settings );<BR>// Run the job<BR>runner.ProcessJob();<BR>} <BR>catch ( Exception exc )<BR>{<BR>AddToLog("Error : " + exc.Message);<BR>} <BR><BR>