How do I use #include

Reply

Join Date: Jun 2005
Posts: 8
Reputation: Wiz-kid is an unknown quantity at this point 
Solved Threads: 0
Wiz-kid Wiz-kid is offline Offline
Newbie Poster

How do I use #include

 
0
  #1
Jun 10th, 2005
Firstly i would like to know WHAT a #include filenameas.asp file is, and HOW can I use it on my site(code). Please clearify this cos I'm confused? :rolleyes:
Reply With Quote Quick reply to this message  
Join Date: May 2005
Posts: 19
Reputation: Lacuna is an unknown quantity at this point 
Solved Threads: 0
Lacuna's Avatar
Lacuna Lacuna is offline Offline
Newbie Poster

Re: How do I use #include

 
0
  #2
Jun 10th, 2005
the code can be either of the following:

<!-- #INCLUDE FILE="filename.asp" -->

or

<!-- #INCLUDE VIRTUAL="filename.asp" -->

First thing to know is you have to have the page these tags are on saved as an .asp page as well.

Use #include virtual to reference files in a higher folder and #include file for those in the current folder or below. Reason being, is virtual goes from the root while file goes from your file's position.

An include file save a LOT of time. If you, for example, have the same left hand side on every page then you can use an include statement and make the left hand side only once. This way, when you want to make a change to the left hand side you change one file and it will effect any pages with the include statement.

Because asp is processed on the server, when you view source on your page it will look like you've put the included file information in your page. So, wherever you stick your include file, it is like putting the coding there instead.

Hope this makes it clear for you!!

~ Lacuna
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 2268 | Replies: 1
Thread Tools Search this Thread



Tag cloud for ASP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2010 DaniWeb® LLC