M
Max2006
Hi,
I have a user control that shows the contents of potentially big html files.
To save the server memory, I try to avoid reading the whole large-file's
text into a label or literal control. Therefore, I tried to use this code in
the user control's code behind:
protected void Page_Load(object sender, EventArgs e)// Also tried
Page_PreRender, same problem!
{
Response.WriteFile(HTMLFileName);
}
The code doesn't work because it dumps the file before the actual page tags.
How can I directly dump a text file at the position of the actual user
control?
Thank you,
Max
I have a user control that shows the contents of potentially big html files.
To save the server memory, I try to avoid reading the whole large-file's
text into a label or literal control. Therefore, I tried to use this code in
the user control's code behind:
protected void Page_Load(object sender, EventArgs e)// Also tried
Page_PreRender, same problem!
{
Response.WriteFile(HTMLFileName);
}
The code doesn't work because it dumps the file before the actual page tags.
How can I directly dump a text file at the position of the actual user
control?
Thank you,
Max