[thelist] ASP SSI Question

James Wampler - Evolt evolt at jwampler.com
Thu Feb 28 10:50:01 CST 2002


Josh,

Unfortunately, dynamic including of files using SSI in this manner is not
possible because IIS processes SSI calls before any ASP.  You can find out
more information about Includes in ASP here.

http://www.4guysfromrolla.com/webtech/080199-1.3.shtml

I have never tried this myself, but I would recommend using the file system
object(FSO) to dynamically include your files.  You can find some
information here.

http://www.aspfaq.com/show.asp?id=2042

I have read that there are actually performance benefits in using the File
System Object over SSI calls in ASP 2.0 (IIS 4.0), so your pages might
actually render faster.  ASP 3.0 added a new Server method, Server.Execute
which will allow dynamic includes, and definitely gives better performance
then SSI Includes, but ASP 3.0 requires IIS 5.0.

Hope That Helps,

James Wampler
james at jwampler.com

=================================================================
> Something like:
>
> do while not recordset.eof
> %>
>    <!-- #include file="page.asp?id=<%=rs('x')%>" -->
> <%
> loop
>
> However, the Response.Write doesn't seem to work when inside the include
> call which in turns breaks the script.
=================================================================




More information about the thelist mailing list