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
Showing posts with label return. Show all posts
Showing posts with label return. 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 ?
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
Html for control
Hi,
Is it possible to get the html for a control? ie. return to a string what
the RenderControl method would output.
Thanks
DonalIf it's your own control you should be able to get it from within the render
event.
If it's not your control then you should be able to call the RenderControl
method of the control to get its output.
--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com
"Donal McWeeney" <donal_mcweeney@.NO-SP-AM.aimware.com> wrote in message
news:Oea88pykDHA.2676@.TK2MSFTNGP11.phx.gbl...
> Hi,
> Is it possible to get the html for a control? ie. return to a string what
> the RenderControl method would output.
> Thanks
> Donal
Thanks... think it kindof answers the question...
"Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
news:OeGaRJ0kDHA.1800@.TK2MSFTNGP10.phx.gbl...
> If it's your own control you should be able to get it from within the
render
> event.
> If it's not your control then you should be able to call the RenderControl
> method of the control to get its output.
> --
> I hope this helps,
> Steve C. Orr, MCSD, MVP
> http://Steve.Orr.net
> Hire top-notch developers at http://www.able-consulting.com
>
> "Donal McWeeney" <donal_mcweeney@.NO-SP-AM.aimware.com> wrote in message
> news:Oea88pykDHA.2676@.TK2MSFTNGP11.phx.gbl...
> > Hi,
> > Is it possible to get the html for a control? ie. return to a string
what
> > the RenderControl method would output.
> > Thanks
> > Donal
Is it possible to get the html for a control? ie. return to a string what
the RenderControl method would output.
Thanks
DonalIf it's your own control you should be able to get it from within the render
event.
If it's not your control then you should be able to call the RenderControl
method of the control to get its output.
--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com
"Donal McWeeney" <donal_mcweeney@.NO-SP-AM.aimware.com> wrote in message
news:Oea88pykDHA.2676@.TK2MSFTNGP11.phx.gbl...
> Hi,
> Is it possible to get the html for a control? ie. return to a string what
> the RenderControl method would output.
> Thanks
> Donal
Thanks... think it kindof answers the question...
"Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
news:OeGaRJ0kDHA.1800@.TK2MSFTNGP10.phx.gbl...
> If it's your own control you should be able to get it from within the
render
> event.
> If it's not your control then you should be able to call the RenderControl
> method of the control to get its output.
> --
> I hope this helps,
> Steve C. Orr, MCSD, MVP
> http://Steve.Orr.net
> Hire top-notch developers at http://www.able-consulting.com
>
> "Donal McWeeney" <donal_mcweeney@.NO-SP-AM.aimware.com> wrote in message
> news:Oea88pykDHA.2676@.TK2MSFTNGP11.phx.gbl...
> > Hi,
> > Is it possible to get the html for a control? ie. return to a string
what
> > the RenderControl method would output.
> > Thanks
> > Donal
Subscribe to:
Posts (Atom)