By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,291 Members | 3,096 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,291 IT Pros & Developers. It's quick & easy.

Tough Problem

P: n/a
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
Nov 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
<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
"Prince" <pr******@cox.net> wrote in message
news:41****************************@phx.gbl...
: 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
Nov 18 '05 #2

P: n/a
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.
"Prince" <pr******@cox.net> wrote in message
news:41****************************@phx.gbl...
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

Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.