Embed non-ASP.NET pages in an ASP.NET page

E

emorgoch

Hi there.

I'm currently working on a project involving rebuilding our local
intranet site. The site was originally developed using frames, defining
a header, sidebar, and content area, which I've been working to replace
using ASP.NET master pages.

Right now I'm trying to find a solution for some of our older and
externally linked content. A good proportion of this content get loaded
into the content frame, leaving the header and sidebar intact. I'm
trying to find a solution that will allow me to still embed this
content inside the content area on my Master page without having to
modify the target.

I was thinking of using a dynamic iframe inside a place-holder page
that would load the desired content, however, I'm having troubling
getting this iframe to properly size to fill the whole content area.
I'm also not convinced that this is the proper direction to go.

Has anyone else encountered this type of problem and what solution did
they use to solve it?

Thanks
 
M

Mark Rae

I'm currently working on a project involving rebuilding our local
intranet site. The site was originally developed using frames, defining
a header, sidebar, and content area, which I've been working to replace
using ASP.NET master pages.
Excellent.

Right now I'm trying to find a solution for some of our older and
externally linked content. A good proportion of this content get loaded
into the content frame, leaving the header and sidebar intact. I'm
trying to find a solution that will allow me to still embed this
content inside the content area on my Master page without having to
modify the target.

I was thinking of using a dynamic iframe inside a place-holder page
that would load the desired content, however, I'm having troubling
getting this iframe to properly size to fill the whole content area.
I'm also not convinced that this is the proper direction to go.

Has anyone else encountered this type of problem and what solution did
they use to solve it?

I think it will depend on the format of your older and externally linked
content. If they are plain HTML files, then it will be fairly simple to
create a content page, place a literal control in it, open the HTML file,
copy everything inside the <body></body> tags using RegEx and then plug that
into the literal control.

One word of caution, though - don't even waste any time trying to come up
with a mechanism whereby the MasterPage controls the contents of its
ContentPage(s) - it just doesn't work like that at all...

Can you provide more information as to the format of your older and
externally linked content...?
 
B

bruce barker

you need to write javascript to size it. attach to the window onresize
event.

-- bruce (sqlwork.com)
 
E

emorgoch

I think it will depend on the format of your older and externally linked
content. If they are plain HTML files, then it will be fairly simple to
create a content page, place a literal control in it, open the HTML file,
copy everything inside the <body></body> tags using RegEx and then plug that
into the literal control.

One word of caution, though - don't even waste any time trying to come up
with a mechanism whereby the MasterPage controls the contents of its
ContentPage(s) - it just doesn't work like that at all...

Can you provide more information as to the format of your older and
externally linked content...?

There's a variety of content.

Some of them are plain HTML files. However, not all of them are local
to the webserver that the ASP.NET page will run from. Some of them are
pages that are served by our parent company's intranet south of the
border (we're up in the great white north).

Another large portion of the content are pure PDF files that get
displayed (using acrobat reader's tie-into IE). There's a single
classic ASP application that won't "upgraded" for a while. Lastly,
there's a few Oracle written HTML manuals that we make available to
users.

Thanks
 
M

Mark Rae

There's a variety of content.

I had a feeling there might be... ;-)
Some of them are plain HTML files.

They will present no problem.
However, not all of them are local to the webserver that the ASP.NET page
will run
from. Some of them are pages that are served by our parent company's
intranet south
of the border (we're up in the great white north).

That shouldn't be a problem either, so long as your webserver can "see"
them. Do a Google search for WebClient, HttpWebRequest & HttpWebResponse...
Another large portion of the content are pure PDF files that get
displayed (using acrobat reader's tie-into IE).

In which case, I don't think you'll need to worry about MasterPage /
ContentPage issues here as you'll be opening the PDFs in a separate browser
window, no...?
There's a single classic ASP application that won't "upgraded" for a
while.

That *should* work on the same principle as the static HTML files unless you
need to run the ASP application interactively in order to get it to display
the correct active content...
Lastly, there's a few Oracle written HTML manuals that we make available
to users.

How does that work? Do you have to query Oracle to get at the HTML? Again,
that should be fairly straightforward...
 
E

emorgoch

Hi Mark,

I've looked over the WebClient, HttpWebRequest/Response objects as you
suggested, and while I can see how they could be used, I don't feel
that they are going to be applicable in this instance. The reason I say
this is that most of the pages I'm going to be loading have links in
themselves to other pages that I will want to keep inside the "frame".
I guess it's feasible that I could re-map to an appropriate handler as
they are read, but is it really feasible?

The other part is that some of the pages do have some client-side
scripting too them as well. I'm not sure how well the WebClient and
other classes would handle those.

As for the oracle stuff: they are HTML based user manuals provided by
oracle, by hosted on our internal server.

I'm still feeling that an iFrame is the way to go, but am having
problems getting it to size properly in the window (which I guess is to
be expected in this case :p)
 
M

Mark Rae

I've looked over the WebClient, HttpWebRequest/Response objects as you
suggested, and while I can see how they could be used, I don't feel
that they are going to be applicable in this instance. The reason I say
this is that most of the pages I'm going to be loading have links in
themselves to other pages that I will want to keep inside the "frame".
I guess it's feasible that I could re-map to an appropriate handler as
they are read, but is it really feasible?

Hmm - you didn't say that earlier! In which case, then, I don't feel the
"screen-scraping" approach will be of much use either...
The other part is that some of the pages do have some client-side
scripting too them as well. I'm not sure how well the WebClient and
other classes would handle those.

As above.
As for the oracle stuff: they are HTML based user manuals provided by
oracle, by hosted on our internal server.

Well, presumably they are self-contained units, or do they have external
links too...?
I'm still feeling that an iFrame is the way to go, but am having
problems getting it to size properly in the window (which I guess is to
be expected in this case :p)

Have you tried JavaScript code behind the window.onresize event, as Bruce
suggested...?
 

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

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top