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.