Showing posts with label window. Show all posts
Showing posts with label window. Show all posts

Monday, March 26, 2012

HTML formatted memorystream.. how to return it in its own browser window ?

I have some code in my codebehind page which formats an html file into a
System.IO.MemoryStream ojbect, how can I use the Response object of my aspx
page to return this result to the user, and in a new window ?
Thanks for any pointers.
MartinHi, Martin
The Response object will only stream back to the window that sends out reque
st. You cannot write to another window.
I would suggest 2 solutions to get around:
1. Save the stream to the session, retrieve it from the new page.
or
2. move the code behind function to the new page, stream to the Response obj
ect.
Bin Song, MCP

HTML formatted memorystream.. how to return it in its own browser window ?

I have some code in my codebehind page which formats an html file into a
System.IO.MemoryStream ojbect, how can I use the Response object of my aspx
page to return this result to the user, and in a new window ?

Thanks for any pointers.

MartinHi, Marti

The Response object will only stream back to the window that sends out request. You cannot write to another window.
I would suggest 2 solutions to get around
1. Save the stream to the session, retrieve it from the new page
o
2. move the code behind function to the new page, stream to the Response object

Bin Song, MCP