Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 1st, 2003, 11:28 PM
Authorized User
 
Join Date: Jun 2003
Location: Gulfport, Ms, USA.
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??
Reply With Quote
  #2 (permalink)  
Old November 2nd, 2003, 06:07 AM
Imar's Avatar
Wrox Author
Points: 72,038, Level: 100
Points: 72,038, Level: 100 Points: 72,038, Level: 100 Points: 72,038, Level: 100
Activity: 50%
Activity: 50% Activity: 50% Activity: 50%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,080
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

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.

Cheers,

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote
  #3 (permalink)  
Old November 2nd, 2003, 05:21 PM
Authorized User
 
Join Date: Jun 2003
Location: Gulfport, Ms, USA.
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to hcweb
Default

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!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 10:37 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.