MAIN MENU
ASP include files
Server Site includes or SSI is a way of adding common data into an ASP script.
This could be used for adding common header or footer information into web pages, or it could be used to contain standart functions that need to be used in different ASP scripts.
The following shows using the virtual include file where the file is located based on the web root.
<%
Name = Request.Form("name)
if Name="Paul" then
%>
<!-- #include virtual="/file1.html" -->
<% else %>
<!-- #include virtual="/file2.html" -->
<%
end if
%>
Name = Request.Form("name)
if Name="Paul" then
%>
<!-- #include virtual="/file1.html" -->
<% else %>
<!-- #include virtual="/file2.html" -->
<%
end if
%>
The following shows using the file include file where the file is located relative to the location of the current file.
<%
Name = Request.Form("name)
if Name="Paul" then
%>
<!-- #include file="file1.html" -->
<% else %>
<!-- #include file="file2.html" -->
<%
end if
%>
Name = Request.Form("name)
if Name="Paul" then
%>
<!-- #include file="file1.html" -->
<% else %>
<!-- #include file="file2.html" -->
<%
end if
%>