Tough Problem

P

Prince

I have a major problem. I have an entire HTML page
stored within a string variable.

ex.

<html><head><title>text</title></head>
<body>
some data
</body>
</html>

the variable, str, equals that entire string.

string str = "<html><head><title>text</title></head>" +
"<body>some data</body></html>";

I want to open a non .NET window and have pass that
string to it. Since the new window will be a PLAIN HTML
window it should parse the string I pass.

Any thoughts on how to accomplish this? I code in C# and
not VB but I can follow VB syntax. An idea I have is to
pass the entire contents within the URL to another
window. Within the new window, use ASP to get the
Request object then use Dynamic HTML InnerHTML property
to make the contents of the new window what is stored
within the request object. Only problem is, the info I'm
passing isn't just innerhtml stuff, it's an entire web
page!

Help!

-- Prince

-- Prince
 
K

Ken Schaefer

<quote>
: An idea I have is to
: pass the entire contents within the URL to another
: window. Within the new window, use ASP to get the
: Request object then use
</quote>

If you are using ASP in the new Window, just Response.Write() the contents.

Cheers
Ken


: I have a major problem. I have an entire HTML page
: stored within a string variable.
:
: ex.
:
: <html><head><title>text</title></head>
: <body>
: some data
: </body>
: </html>
:
: the variable, str, equals that entire string.
:
: string str = "<html><head><title>text</title></head>" +
: "<body>some data</body></html>";
:
: I want to open a non .NET window and have pass that
: string to it. Since the new window will be a PLAIN HTML
: window it should parse the string I pass.
:
: Any thoughts on how to accomplish this? I code in C# and
: not VB but I can follow VB syntax. An idea I have is to
: pass the entire contents within the URL to another
: window. Within the new window, use ASP to get the
: Request object then use Dynamic HTML InnerHTML property
: to make the contents of the new window what is stored
: within the request object. Only problem is, the info I'm
: passing isn't just innerhtml stuff, it's an entire web
: page!
:
: Help!
:
: -- Prince
:
: -- Prince
 
M

Michael Earls

If I understand this correctly, this is a severe security risk if you're not
careful. You probably don't want to trust anthing that comes in off of the
query string without checking it first. In addition, don't forget that
there is an upper limit to the size of the query string.

Not sure what you mean exactly about a "non .NET" window. Do you mean
another browser that needs to access a non ASP.NET page?

Maybe you could stuff it in a cookie. Just remember ot parse it and make
sure that it hasn't been tampered with before you spit it out to your users.
 

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

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top