Selective inclusion of Include files

Results 1 to 5 of 5

Thread: Selective inclusion of Include files

  1. #1
    MA Guest

    Default Selective inclusion of Include files

    Hi: Can we do something like this in VB Script<BR>PLEASE HELP<BR><BR>If &#060;condition1&#062; then<BR> &#060;!-- #include "xxx.asp" --&#062;<BR>elseif &#060;condition2&#062; then<BR> &#060;!-- #include "yyy.asp" --&#062;<BR>end if<BR><BR>

  2. #2 Guest

    Default RE: Selective inclusion of Include files

    The include directive automatically places the text contained within the included file into your page prior to being processed. There is no way I know of to selectively prevent an include file from being loaded - I had the same problem on our Web site. I had to make sure each include file did not use the same variable names or I received name redeclaration errors.

  3. #3
    Join Date
    Dec 1969

    Default may find answer here....

    Depending on what is in your include file, you may find this helpful. I tried to use this technique to include some generic functions, but could not get the server to "recognize" the functions I read in. <BR><BR>

  4. #4
    MA Guest

    Default RE: may find answer here....

    The case statement in the example at the given URL did not work for me either.<BR><BR>Some how it seems there is no way to Selectively include a file in you ASP page.<BR><BR>If you guys tell me otherwise, It will be solve my miseries

  5. #5
    Hann Guest

    Default RE: Selective inclusion of Include files

    This type of operation is only possible using IIS 5 (win2k), and that&#039s using the Server.Execute command (I think). <BR><BR>INCLUDE directives are always processed before the code is actually parsed by the script engines.

Posting Permissions

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