dcsimg
Login | Register   
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.


Tip of the Day
Language: Active Server Pages (ASP)
Expertise: Beginner
Jun 10, 1999

WEBINAR:

On-Demand

Application Security Testing: An Integral Part of DevOps


Dynamic Includes

Question:
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.

Answer:
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 ...
%> <% End Select %>
Be very careful about placing the <% and %> tags, though.

DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
×
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.
Thanks for your registration, follow us on our social networks to keep up-to-date