View Single Post
  #2 (permalink)  
Old 09-19-03, 10:32 AM
MadDog MadDog is offline
Code Master
 
Join Date: Aug 2003
Posts: 935
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by TheLaughingBandit
i want to add a variable into the include file tags.
something like this even though this doesnt work
<!--#include file="<%=strID%>.asp"-->
so if strID = abc
abc.asp would be included
<!--#include file="abc.asp"-->

or if anyone knows a better way to display the code from an external file, like abc.asp into a text area.

<textarea rows="10" cols="50">
<!--#include file="<%=strID%>.asp"-->
</textarea>
If you want to add a variable in an include you would have to use the following:

<% Server.Execute(strID) %>

The reason is includes are executed before the asp code, so you wont be able to use in variables for the include name.
__________________
Drew Gauderman
ASP - MSSQL Coder / Buisness Owner / Coder for Hire!
MSN-ICQ-AIM-YIM in Profile

http://www.iportalx.net an easy ASP portal system.
Reply With Quote