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 response. Show all posts
Showing posts with label response. 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 encoding SOAP response
Is there anyway I can make my xml webservice not htmlencode the response
from a call to an API?
I have:
public int PerformOperation(string operation, out string result)
The content of result is html encoded, but since it contains valid xml,
I should get away with not htmlencoding it, or not?
<soap:Body
<PerformOperationResponse xmlns="http://tempuri.org/"
<PerformOperationResult
0
</PerformOperationResult
<result
<RetrieveTreeResponse id="123"
<Node id="1"
title="TopLevelNode1"
<Node id="2"
title="2LevelNode1" /
<Node id="3"
title="2LevelNode2" /
</Node
<Node id="4"
title="TopLevelNode2" /
</RetrieveTreeResponse
</result
</PerformOperationResponse
</soap:Body
Casper Hornstrup wrote:
> Is there anyway I can make my xml webservice not htmlencode the response
> from a call to an API?
> I have:
> public int PerformOperation(string operation, out string result)
> The content of result is html encoded, but since it contains valid xml,
> I should get away with not htmlencoding it, or not?
Try to use a parameter of type XmlNode instead of a string.
> <soap:Body>
> <PerformOperationResponse xmlns="http://tempuri.org/">
> <PerformOperationResult>
> 0
> </PerformOperationResult>
> <result>
> <RetrieveTreeResponse id="123">
> <Node id="1"
> title="TopLevelNode1">
> <Node id="2"
> title="2LevelNode1" />
> <Node id="3"
> title="2LevelNode2" />
> </Node>
> <Node id="4"
> title="TopLevelNode2" />
> </RetrieveTreeResponse>
> </result>
> </PerformOperationResponse>
> </soap:Body>
>
--
Martin Honnen
http://JavaScript.FAQTs.com/
from a call to an API?
I have:
public int PerformOperation(string operation, out string result)
The content of result is html encoded, but since it contains valid xml,
I should get away with not htmlencoding it, or not?
<soap:Body
<PerformOperationResponse xmlns="http://tempuri.org/"
<PerformOperationResult
0
</PerformOperationResult
<result
<RetrieveTreeResponse id="123"
<Node id="1"
title="TopLevelNode1"
<Node id="2"
title="2LevelNode1" /
<Node id="3"
title="2LevelNode2" /
</Node
<Node id="4"
title="TopLevelNode2" /
</RetrieveTreeResponse
</result
</PerformOperationResponse
</soap:Body
Casper Hornstrup wrote:
> Is there anyway I can make my xml webservice not htmlencode the response
> from a call to an API?
> I have:
> public int PerformOperation(string operation, out string result)
> The content of result is html encoded, but since it contains valid xml,
> I should get away with not htmlencoding it, or not?
Try to use a parameter of type XmlNode instead of a string.
> <soap:Body>
> <PerformOperationResponse xmlns="http://tempuri.org/">
> <PerformOperationResult>
> 0
> </PerformOperationResult>
> <result>
> <RetrieveTreeResponse id="123">
> <Node id="1"
> title="TopLevelNode1">
> <Node id="2"
> title="2LevelNode1" />
> <Node id="3"
> title="2LevelNode2" />
> </Node>
> <Node id="4"
> title="TopLevelNode2" />
> </RetrieveTreeResponse>
> </result>
> </PerformOperationResponse>
> </soap:Body>
>
--
Martin Honnen
http://JavaScript.FAQTs.com/
Labels:
apii,
asp,
call,
encoding,
havepublic,
html,
htmlencode,
int,
net,
operation,
performoperation,
response,
responsefrom,
soap,
string,
webservice,
xml
Subscribe to:
Posts (Atom)