Monday, March 26, 2012

OpenPageInsidePage

I have an aspx page that I use a user control for the left hand menu and
a user control for the header. I have a table in the middle of the
page. When the user selects one of the links from the menu, I have
another websites home page I would like to open up inside the aspx page.
Can this be done without using frames?

Thanksyou could use an IFRAME, or do an HTTP request for the page on the
server and write its output (stripping out the head stuff)

i suppose the main question is, why do you want to do this?

gh wrote:

Quote:

Originally Posted by

I have an aspx page that I use a user control for the left hand menu and
a user control for the header. I have a table in the middle of the
page. When the user selects one of the links from the menu, I have
another websites home page I would like to open up inside the aspx page.
Can this be done without using frames?
>
Thanks


The customer is requesting it to be done this way. They own both sites
but the other one is written in java and he does not want to pay the
other company to do the interfacing. The other sites home page has some
special processing it does depending on the button the user clicks, on
the home page. He wants to make it appear as if the other site is part
of the new .net site I have created for them.

Thanks

neilmcguigan@.gmail.com wrote:

Quote:

Originally Posted by

you could use an IFRAME, or do an HTTP request for the page on the
server and write its output (stripping out the head stuff)
>
i suppose the main question is, why do you want to do this?
>
>
gh wrote:
>

Quote:

Originally Posted by

>>I have an aspx page that I use a user control for the left hand menu and
>>a user control for the header. I have a table in the middle of the
>>page. When the user selects one of the links from the menu, I have
>>another websites home page I would like to open up inside the aspx page.
> Can this be done without using frames?
>>
>>Thanks


>
>


Not if you expect to show the whole page, and loading the page via the .NET
web classes (ie. webrequest) would usually cause your page to be invalid
HTML - you cant have two head tags, body tags etc. Stripping to just load
the body contents could invalidate the page you are trying to load and make
it fail if it uses javascript or css. I always advise people to stick to
iframes or new windows for this type of thing.

Regards

John Timney (MVP)

"gh" <gh@.attt.netwrote in message
news:Orz98RfoGHA.4404@.TK2MSFTNGP05.phx.gbl...

Quote:

Originally Posted by

>I have an aspx page that I use a user control for the left hand menu and a
>user control for the header. I have a table in the middle of the page.
>When the user selects one of the links from the menu, I have another
>websites home page I would like to open up inside the aspx page. Can this
>be done without using frames?
>
Thanks
>

0 comments:

Post a Comment