I was fighting with this a while ago and I think I found at article right to the point on the subject:
Real Progress Bars in Web Application
“The key thing for creating Progress Bar in a web application, is the browser's ability to display a page before it's totally loaded. We'll use this feature to progressively build and send the page to the client. First, we'll send the HTML code to display a nice and beautiful progress bar. Then, here is the trick, we'll dynamically send some Javascript code blocks that will updates its progression. All these, of course, before closing the HTTP request. In C#, Response.Write() lets us add some HTML to the buffer while Response.Flush() sends all buffered data to the client.”
Excellent! Thanks Julian :)