If you want to include another ASP or HTML page in another ASP page, you can use the Include tag. Note that this is a HTML tag rather than an ASP command, but the ASP processor still interprets it. To include a file, use
<!--#include file="myfolder/path.asp"-->
Note that this must be included in a HTML section of your ASP page rather than VB code. Also bear in mind that you can't conditionally include code. For example,
<% If bItem Then %>
<!--#include file="myfolder/path.asp"-->
<% Else %>
<!--#include file="myfolder/path2.asp"-->
<% End If %>
Won't work as you think it should - both files will be included. If you wish to use virtual paths rather than relative ones, use
<!--#include virtual="/myfolder/path.asp"-->
instead.
Comments