Render control content to response during method (ASP.NET)
<p>I've done some searching on Strack Overflow and the web for some ideas, but either I can't figure out what the search for or there's no a lot to go on.</p>

<p>What I'm trying to do is render HTML to the response in the middle of a process... to keep the browser updated (this is for internal use, not client use).</p>

<p>Legacy code (in classic ASP) outputs directly to the response stream during this process with Response.Write. I realize I can do this in ASP.NET as well, but I'm trying to bring better design patterns about and utilize data bound controls, code-behind, etc (it's rough).</p>

<p>I realize I could accomplish this with AJAX/etc, but I'm hoping there's a control (or a way to make a control do this) that can output it's content to the response stream as it's value is changed (or, added to at least).</p>

<p>Something like a Repeater would work wonderfully. I would have a collection of strings, for example, databound to the Repeater. The item template would simply be a paragraph with that string in it. I'd have a function, say <code>run</code> that does a process on several items, and adds a string to the collection.</p>

<p>With each iteration, the string would be added to the response and we'd all go our merry way.</p>

<p>An alternate solution would be to have an ASPX page that performed this operation for a single object and returned a JSON response with the results. This would be a hassle (and not very efficient when I could have thousands of records that I can share resources during the process).</p>

<p>I can't think of anyway to update the progress using an UpdatePanel either.</p>

<p>Thanks in advance</p>
