#include and <script runat="server">

Discussion in 'ASP General' started by Michael, Jul 11, 2003.

  1. Michael

    Michael Guest

    There seem to be two ways to include files on the server:
    1. <!-- #include file="header.inc" -->
    2. <script language="VBScript" runat="server" src="header.inc"></script>

    What are the differences between the two, and when to use one instead of the
    other?

    Thanks.
     
    Michael, Jul 11, 2003
    #1
    1. Advertising

  2. Michael

    Michael Guest

    So option 2 will have to contain only scripts, no HTML; except if used like
    Response.Write("<div>")?


    "Lance Wynn" <> wrote in message
    news:...
    > Also, with number 2, can you use <% %> tags within the file? I don't

    think
    > you can, but I may be wrong.
    >
    >
    > "Curt_C [MVP]" <Software_AT_Darkfalz.com> wrote in message
    > news:...
    > 1) is included PRIOR to the server parsing the page.
    > 2) is done AFTER
    >
    > --
    > ----------------------------------------------------------
    > Curt Christianson (Software_AT_Darkfalz.Com)
    > Owner/Lead Designer, DF-Software
    > http://www.Darkfalz.com
    > ---------------------------------------------------------
    > ..Offering free scripts & code snippits for everyone...
    > ---------------------------------------------------------
    >
    > "Michael" <> wrote in message
    > news:...
    > > There seem to be two ways to include files on the server:
    > > 1. <!-- #include file="header.inc" -->
    > > 2. <script language="VBScript" runat="server" src="header.inc"></script>
    > >
    > > What are the differences between the two, and when to use one instead of

    > the
    > > other?
    > >
    > > Thanks.
    > >
    > >

    >
    >
    >
    >
     
    Michael, Jul 11, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kevin Spencer
    Replies:
    0
    Views:
    512
    Kevin Spencer
    Jul 15, 2003
  2. Hazzard
    Replies:
    2
    Views:
    586
    Yan-Hong Huang[MSFT]
    Jul 23, 2003
  3. Replies:
    1
    Views:
    4,939
    Craig Deelsnyder
    Oct 31, 2003
  4. Andreas Bogenberger
    Replies:
    3
    Views:
    1,003
    Andreas Bogenberger
    Feb 22, 2008
  5. John MacIntyre
    Replies:
    1
    Views:
    206
    Lasse Reichstein Nielsen
    Sep 29, 2003
Loading...

Share This Page