Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Embedding an ASPX in an existing HTML page?

Status
Not open for further replies.

ryansupak

MIS
Jul 23, 2002
39
US
Hi,

There is an HTML page, and it is already in its completed form.

There is an ASPX page, and it is already in its completed form.

What I'd like to do, is "embed" the ASPX page in in the HTML. Knowing little about HTML, I thought an inline frame would work.

However, when I do this the ASPX part never loads -- i end up with a white screen.

What's the best way to do this?

Any insight would be appreciated!
rs
 
You *might* be able to setup the HTML extension to run the ASP script engine, but all HTML pages would then run it and your performance would suffer.

Why can't you rename the .HTML file to .ASPX?
 
Hi,

Unfortunately I can't do that, because the HTML file will ultimately be maintained separately from me.

Do you know of a simple example that shows an ASPX within an HTML?

I think there's something on the IIS side I'm doing wrong, but maybe seeing a reallife example would help this beginner out.

Thanks!
rs
 
Server side include it?
<!--#include virtual="/path_to_asp/asp_code.aspx" -->

 
I'm almost with you -- but since I'm dense, in which file do I place that #include?
 
In other words -- do I place it in the html file, the aspx file, or in a different file altogether?
 
Sorry no. it's me being dense. ssi's only include text.

I asked our web guru and he agreed... only way is to change IIS to process files with the HTML extension with the ASP dll.
 
OK, I better work around then with HTML post requests or something then.

Thanks
rs
 
If the only issue is that the HTML page is to be maintained separately, can you not rename the .HTML to .ASP. , and give that them to maintain.

Add <!-- #include file="asp_file.asp" --> to the .HTML file at the location you want your server generated code.

Then, the HTML only page can be maintained as HTML only (the .ASP extension won't prevent this.). And so can the ASP code.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top