Results 1 to 3 of 3

Thread: Includes

  1. #1
    risci Guest

    Default Includes

    Is there a way to not have to open and close the asp delimiters so often when using pottentially different include files?<BR><BR>&#060;%<BR>&#039 Browser Capability Detection<BR>Dim objHawk<BR>Set objHawk = Server.CreateObject("cyScape.browserObj")<BR>If objHawk.XML Then<BR>%&#062;<BR>&#060;!-- #include file="homeaudio-xml.asp" --&#062;<BR>&#060;%<BR>Else<BR>%&#062;<BR>&#060;!-- #include file="homeaudio-html.asp" --&#062;<BR>&#060;%<BR>End If<BR>Set objHawk = Nothing<BR>%&#062;<BR><BR>Would it be less of a performance hit to just load the code into the 1 file and not use includes?

  2. #2
    Join Date
    Dec 1969

    Default RE: Includes

    You have to use those opening and closing script blocks. The performance hit to do this (assuming those files you are including aren&#039t huge, MB-sized files) is minimal and the advantages you receive by encapsulating your code are great. Stick with the include files, they make any sort of changes in the future much, much easier.<BR><BR>For a GREAT article on server-side includes, be sure to read:<BR><BR>The Low-Down on #include<BR><BR><BR>Happy Programming!

  3. #3
    risci Guest

    Default RE: Includes

    Excellent, I was hoping for that answer!<BR>That is my plan then.<BR><BR>Thanx..<BR><BR>

Posting Permissions

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