Response.BinaryWrite Help

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

Why when posting a txt file as Binary does the HTML for the web page
also post with it? Or is it the Response.BinaryWrite that's doing
it? Any help would be appreciated.

Thanks
 
Dave said:
Why when posting a txt file as Binary does the HTML for the web page
also post with it? Or is it the Response.BinaryWrite that's doing
it? Any help would be appreciated.

Why wouldn't the HTML post with it?

<html>
<body>
<%Response.BinaryWrite(some array of bytes here)%>
</body>
</html>

what would you expect to happen?

I suspect you have this code in the Page_Load event and haven't done a
Response.End() before leaving the event.

You might be better off using an .ashx for this task.
 
Back
Top