I have the next code of view:
@{ Layout = null; }
@Html.Raw(ViewBag.ReportHeader as string)
@{
Response.Buffer = true;
Response.Flush();
}
@Html.Raw(ViewBag.ReportBodyAndFoot as string)
In this scenario, I expected the header of the page to be rendered first and then the body with the footer, but the response sent the entire page.
I have found the answer: