Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    35
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Including files...

    I think this can be done but I don't know how. I know how to link style sheets and was wondering if it would be the same principle.

    What it is, is that I have a site that has the one menu bar built into it on the left hand side. This is built into a table. I was wondering if I could copy and paste that table into a separate file THEN include this file into each page via a link of some type.

    Is this possible? And if so, coz someone kindly show me some code or post a link etc.

    Cheers,

    ih.

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Since you are asking in the ASP forum I'll assume you are using APS pages. ASP pages support Server Side Includes to a limited degree but that support does include the part where you can copy files into your pages:

    <!--#include file="yourfilenamegoeshere"--> for files in the current directory or some descendant directory and <!--#include virtual="pathandfilenamehere"--> for globally used files that aren't in the same directory structure (this also assumes the option to allow such references is enabled).

  • #3
    New to the CF scene
    Join Date
    Aug 2002
    Location
    Istanbul
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    save your menu table into the seperate file and use

    <!--#include file="menu_table.htm"--> for each pages you want to show menu table

    also you can use "include virtual" instead of "include file"


    if all of your file in same dir , just use include file


  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    41 8' 52" N -95 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This is also supported by SHTML, ASP isn't necessary for this as many servers support SHTML includes. (But the syntax is the same! YAY!)
    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •