Print Page | Close Window

Newbie question about site hierarchy/asp

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=1222
Printed Date: 29 March 2026 at 5:17am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Newbie question about site hierarchy/asp
Posted By: grandoompa
Subject: Newbie question about site hierarchy/asp
Date Posted: 21 March 2003 at 5:47pm

Hi, I really enjoy this site, its avail. apps and the forums, so I'd like to ask a general asp question.  I'm pretty new to .asp use and I'm really getting into it.  Everything so far is just self thought.  blah blah blah.  

Anyways, here's my question...

When doing a asp script include on my, I seem to encounter problems about using an included script on pages in different folders within my root directory.  I'd like to ask if there is a certain logic in my site structure I need to pay attention to and consider as I'm building my site?  For example, i'm making all pages asp because they all are including some sort of asp on them.  I have my index.asp and global file directly in my root, then I have my a pages folder inside that and an images folder.  For certain scripts like newsletters, etc, I've given them their own folders to seperate their pages.  None of them go more then one folder deep inside my root. I'd like my index page and other pages in the 'pages' folder to use the same asp scripts included on them.  Like a poll, newsletter subscription, etc.  Ok, I think I'm rambling and probably making it more confusing.  If anyone understands what I'm getting at, can you please help out a newbie?

thanks

www.grandoompa.com




Replies:
Posted By: michael
Date Posted: 22 March 2003 at 5:21pm

The best way to do it is to use include virtual, that way you reference the include file from the root of you web. So if you include a page in you e.g. includes subdirectoy the include statement would be <!--#Include Virtual="includes/file.asp"--> no matter where you are calling it from. Hope that answered you question.



Posted By: grandoompa
Date Posted: 24 March 2003 at 5:04pm

Yeah, it's what I was originally thinking.  Thanks for your posting.  It reassured me.  Yet, I seem to be encountering a problem that I think maybe comes from my lack of understanding any limitations.  Example: I'm currently trying to incorporate the Web Wiz Poll into my site.  Still, my 'pages' are in their pages folder and my index is directly in the root.  I decided to be put all Poll files into a file directly in my root called 'poll' and removed the 'default.asp' file from it.  I attempt to put an include file on my index page as "<% Server.Execute "poll/weekly_poll.inc" %>", but it doesn't seem to be calling it up once I've uploaded all the files to my server. I just get the following in the area I inserted the include:

OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x6f4 Thread 0xac0 DBC 0x8f272fc Jet'.

/poll/common.inc, line 91

Any ideas or could any of you asp guru's who get a rise out of teaching a newbie the way of the light care to help and pick on me all you'd like?



Posted By: Flamewave
Date Posted: 24 March 2003 at 5:25pm

Try replacing

<% Server.Execute "poll/weekly_poll.inc" %>

with

<!--#Include Virtual="poll/weekly_poll.inc"-->

-------------
- Flamewave

They say the grass is greener on the other side, but if you really think about it, the grass is greener on both sides.


Posted By: grandoompa
Date Posted: 24 March 2003 at 5:59pm

Thanks!  I tried that too.  The Read Me file for the Web Wiz Poll says:

6. If you find you are having problems make sure: -

 6.1 The page you want the weekly poll on is an ASP page with the .asp extension.
 6.2 All the other files from the zip file, except the default.asp, are in the same
     folder as the page you want the Weekly Poll on.

I guess there's really no way around that.  At least for someone who just now learning through trial and error.   It sucks.  It's such a great poll to use.



Posted By: michael
Date Posted: 24 March 2003 at 10:03pm
It seems you have the wrong path to the poll database. Try taking out the server.mappath and exchange it with the physical path, that way you make sure you don't mix them up.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net