Diff between Server.Execute and Includes..been rea

Results 1 to 2 of 2

Thread: Diff between Server.Execute and Includes..been rea

  1. #1
    BookWorm Guest

    Default Diff between Server.Execute and Includes..been rea

    Hi, <BR><BR>I have been studying the Server.Execute and the Includes in my books and articles on this web site. I understand each well but can&#039;t see a real difference between the two. Perhaps Server.Execute is slower because it has to pass another page to the asp.dll? I can&#039;t get the Option Explicit to take when I use my .asp file as an include, but it does work when it is called with Server.Execute. I know the include will work with asp 2.0....which does not have the Server.Execute method. My css will not work on the code when it is set as an include or when it is called with server.execute... <BR><BR>Am I missing something? <BR><BR>Thanks

  2. #2
    Join Date
    Dec 1969

    Default RE: Diff between Server.Execute and Includes..been

    as far as i know:<BR>When having a case select with several cases. Each case has a server.execute then the parser don&#039;t takes the files into the parsing proces until one is needed. with a case select and each case had a &#060;include&#062; then all the included files are parsed and only the one of importance get&#039;s executed.<BR><BR>Big difference! The first one has to parse each execute a .asp file, which is slower. <BR>So, when a file is used often then use a include. when a file is not often used, server.execute. This could be handy if (for example) you have 20 cases with all big .asp behind it. When using execute only the one of importance is parsed and... the memory of the server won&#039;t be filled with nonsense. When having a module which is used every run, include it so the server will have the parsed .asp available.<BR><BR>in short: server.execute sees the file as a new application so you have to start with option explicit in that file (if you wish to use it). An include only the first page has to contain option explicit because of the fact that the server parses the whole document.

Posting Permissions

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