Wrox Programmer Forums
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old November 1st, 2003, 11:28 PM
Authorized User
Join Date: Jun 2003
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to hcweb
Default Response.Write an SSI

I'm not sure if this is possible but I'm trying to response.write out a server side include. I've tried the following to no avail.

First I tried:
' Dim strLink, strSSI
' strLink = "tc001.asp"
' strSSI = "
Then included ' <%= strSSI %> on another section of the page. This returned nothing visibly.

I then tried:
' Dim strSSI
' strSSI = "tc001"

and included it like this:

which resulted in this error "The include file '<%= strMenu %>.asp' was not found.

Anyone know how to do this??
Old November 2nd, 2003, 06:07 AM
Imar's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts

Hi there,

You cannot dynamically include a file. All include files are read (and included) before the entire script is passed to the ASP engine. So as far as the ASP engine is concerned, there are no include files. All it does is process one script.

This means that strSSI won't have a value at the moment the file is included, so you'll get an error.

You can use Server.Execute to simulate a dynamic include file. Alternatively, check here and here for more information.



Imar Spaanjaars
Everyone is unique, except for me.
Old November 2nd, 2003, 05:21 PM
Authorized User
Join Date: Jun 2003
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to hcweb

Thanks again Imar.. I was afraid you were going to say that. All my searching had pretty much produced the same results. However, the 4Guys page looks promising. Thanks again!

Similar Threads
Thread Thread Starter Forum Replies Last Post
Response.Write doesn't work? Ron Howerton Pro JSP 1 March 27th, 2007 02:03 AM
Response.Write won't work? Ron Howerton JSP Basics 1 March 23rd, 2007 07:39 AM
response.write crmpicco Classic ASP Basics 1 January 27th, 2005 06:31 PM
response.write netcrawler Classic ASP Databases 4 September 29th, 2004 10:13 AM
Response.write Sach Classic ASP Components 5 March 19th, 2004 06:40 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.