Including .asp in a .aspx file?

Ok, I did a project for work in old school ASP. Now my team members are doing their section in .NET including the mast head and side bar. So, to avoid rewriting the code for the side and top menus, I want simply include my .ASP file inside of the .aspx file.

According to WROX ASP.NET 1.0 us use the same <!-- [file|virtual]=“/[path_name]/[file_name]” –> we have all grown to love… However, when I try this I get errors… :frowning:

It is totally out of the question to have my site redone in .NET it would take way too long.

Any help would be great!


you can’t do ASP and ASP.NET within the same page. the way the include statement works is that when page A includes file B. file B is virutally inserted into page A at the include point. THEN the new version of page A is rendered using the appropriate engine associated w/ page A filetype. thus having an ASP page include an ASPX page will cause the ASPX code to be parsed by the ASP engine, which will obviously crash.

you can still use your old asp COM objects however.

<%@ Page Language=“whattheyuse” aspcompat=“true” %>

ok, so that wasn’t what I was hoping for… but maybe it is…

Can I make the entire page a COM object returning a giant string containing the HTML for the page then response.write the HTML string? I don’t know COM so please let me know if I’m completely insane for suggesting this…


Ok, perhaps this is a better idea… create a little app that goes to each part of my page. Views the source, then saves that as a static page (ie “page1.htm”). I could then just link to static pages and include those pages…

The site really doesn’t change, so I think this should work…