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 June 7th, 2004, 02:07 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

I don't think this is the problem, but you have %> at then end of your include lines instead of just >.

Snib

<><
 
Old June 7th, 2004, 03:32 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 196
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to jmss66
Default

I was wondering too at the %> instead of just >. The examples in the link Imar gave me was showing this that is why I followed it. I was thinking that probably it will work. Which it did not. I guess the example was wrong and I was copying it just like a parrot. I am not sure.

Thanks,
Judy

 
Old June 7th, 2004, 03:37 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Yeah, I guess the link was wrong. Although I still don't know if that will fix your problem.

Snib

<><
 
Old June 7th, 2004, 04:31 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Yeah, the code indeed has errors. Sorry about that (not my article; just linked to it)

Still, the article has useful information about why dynamic includes are problematic, and how to work around those issues.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old June 7th, 2004, 04:38 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Yeah, isn't there an ASP include function like PHP's include() and require()?? Those, at least, are real easy.

Snib

<><
 
Old June 9th, 2004, 08:05 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 196
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to jmss66
Default

Yes Imar it was very informative. It just confirmed my guess that however you code your if statements, the include files will be included. Thanks for all your help guys.

I wonder if Snib's question about ASP having a function like PHP's include() can correct the way I handled my code? I felt like I cheated with the work around I did on my program to make it work.

Thanks,
Judy

 
Old June 9th, 2004, 10:20 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Judy,

AFAIK, ASP doesn't have like that of the PHP function. There is also another way of doing this, may be the recent work around.

I had posted this already in a discussion on other topic in the same forum. I have tested this too, and found no problem in it. You can take a look at it though you problem is sorted out.

How to Implement Conditional Includes in ASP using VBScript - was posted in that site on 2nd Feb 2004.

You may want to read that post.
How to use "#include file in if..then statment?

Hope that helps.
Cheers!

PS: Though it works fine with "SELECT CASE...", I still wonder, how could the include thing not work as expected with IF... ELSE... construct, but work with SELECT CASE...
IMO, both look almost similar in functionality, but one fails and other seems to be the workaround. Got to research.:)

_________________________
-Vijay G
Strive for Perfection





Similar Threads
Thread Thread Starter Forum Replies Last Post
include files b00gieman Classic ASP Basics 2 September 15th, 2007 10:22 AM
Include files tarang SQL Server 2000 1 July 18th, 2007 03:32 AM
Include files errors ahmedkhadragi C++ Programming 1 December 8th, 2006 08:02 AM





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