Use a select ... case ... construct
Code:
<%
select case lcase(request.querystring("id"))
case "page1"
%>
<!--#include virtual="/page1.asp"-->
<%
case "page2"
%>
<!--#include virtual="/page2.asp" -->
<%
case "page3"
%>
<!--#include virtual="/page3.asp" -->
<%
case else
' this will be executed if no querystring value exists or does not match
%>
<!--#include virtual="/page.asp" -->
<%
end select
%>
Be aware that in ASP includes are parsed before code execution, so if any variable names are duplicated in any of the includes it will throw an error. Common variables should be defined prior to the select statements.
If this creates a problem look at using the server.transfer("page.asp") method in place of the includes.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
|