I am writing a page asp.netthat prints the text as follows:
protected void Page_Load(object sender, EventArgs e)
{
Response.ClearContent();
for (int i = 0; i <=100; i++)
{
var isOk = DoSomeTask(i);
context.Response.Write(string.Format("Step {0}: {1}",i, isOk ? "Success": "Error"));
Thread.Sleep(4000);
}
}
I have a problem, the text is displayed only when the page loads successfully. How to render text at runtime?
source
share