Showing posts with label object. Show all posts
Showing posts with label object. 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

Wednesday, March 21, 2012

Html and Javascript inside the C# function

Hi

How to put html and JavaScript code into C# function?

eg:

private void ButtonLoad_Click(object sender, System.EventArgs e)
{
......

<html></html> <- how?
......
}Is register clientsidescript block helps you?

For info on it see below link!

http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemWebUIPageClassRegisterClientScriptBlockTopic.asp?frame=true
Great Thanks :)