<%
if page="links" then%>
<!--#include file="links.htm"-->
<%end if
%>
<%
if page="homepg" then%>
<!--#include file="homepg.htm"-->
<%end if
%>
<%
if page="id" then%>
<!--#include file="id.htm"-->
<%end if
%>
All the code in all the files would get included here (so for example you wouldn't be allowed to dim the same variables outside functions in 2 different included files) but only the code within the appropriate If Then would get acted upon.
For dynamic includes you may want to look into Server.Execute like this:
And in general don't forget about this possible structure for code:
If blah1 Then
...
Elseif blah2 Then
...
Elseif blah3 Then
...
Else
...
End If
Bookmarks