How to include classic ASP page into an ASP.NET page?

maw

Supreme [H]ardness
Joined
Sep 27, 2000
Messages
4,135
i'm just learning ASP.NET/C# and i'm trying to convert some of my classic ASP pages over to .NET. However i've run into a problem. Many of my classic ASP pages include other asp pages that were dynamically generated. E.g. I have a news.asp page that has

<!--#include virtual="/articles.asp" -->

where articles.asp uses a connection string to connect to a DB to pull current news articles.

The problem I'm having is that when i use the above <!--#include in my ASP.NET page, it's choking on the classic ASP code that articles.asp is using (i get errors on the .NET page regarding the single quotes used for comments, the connection string calls, etc..). It's like the ASP.NET page is trying to compile the classic ASP code found in the articles.asp page instead of just including the output it generates.

Anyone know why this is happening and if there is a simple solution or workaround?

Thanks
 
Back
Top