I'm running a long process from one of my aspx pages, so I call BeginInvoke on an object method passing in an object called "state". "state" has three properties (among other info) that include PercentComplete, StatusMessage, and Results. This works out well because I put the "state" object into Session and then I can pass the "state" object as a param to BeginInvoke. Otherwise, the thread on BeginInvoke has no context for the Session.
After BeginInvoke is called, enable a JavaScript code sni