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:

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.