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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top