Friday, August 16, 2013

Progressive rendering via multiple flushes

For HTML Reporting in ASP .net Multiple flushes helps alot in improving user experience.
Each flush generates the chunk of data on display that gives user something to see.
without flush one will have to for the whole page to be rendered but with Progressive rendering the waiting time that frustates user is minimized.
Syntax:
Response.Write("Html code here !");
for(int i=0;i<1000;i++)
{
Response.Flush();//This is what that does all the magic of Progressive Rendering.
.
.
.
.
Response.Write("Your HTM here");

}