How can I do a dynamic include, such as:
However, I think I know why this doesn’t work– because includes are tossed in before it goes to the parser (asp.dll). But if that’s the case, why is it? I seem to have tried every possible combination trying to get this to work, to no avail.
You are right: it can’t be done. But there is a workaround, if you can live with it. Simply use a large Select Case statement:
<%Select Case varfilename Case "value1"%><% Case "value2"%><%
… and so on …
Be very careful about placing the <% and %> tags, though.