"Dynamic" includes

Results 1 to 2 of 2

Thread: "Dynamic" includes

  1. #1
    Join Date
    Dec 1969

    Default "Dynamic" includes

    Hi,<BR><BR>I have the following code:<BR><BR>&#060;%<BR>Dim bc<BR>Set bc = Server.CreateObject("MSWC.BrowserType")<BR>Select Case bc.browser<BR> Case "IE": %&#062;<BR>&#060;!--#include file="IE.asp"--&#062;<BR>&#060;% Case "Netscape": %&#062;<BR>&#060;!--#include file="NN.asp"--&#062;<BR>&#060;% <BR>End Select<BR>Set bc = Nothing %&#062;<BR><BR>That I have used before and worked, (in a different guise). It also, more or less, follows the advice as shown in the "includes" reference work on this site.<BR><BR>What happens, however, is that the browser is trying to load both files.<BR><BR>Can anyone help please?<BR><BR>Cheers<BR><BR>Keith

  2. #2
    M. Robold Guest

    Default RE: Conditional SSI's

    Unless you are coding for ASP 3.0 (running IIS 5.0 on W2K), you cannot run conditional server-side includes. Whenever you list an SSI, IIS will automatically incorporate the code into page requesting the include file. You don&#039t get a choice. Best thing to do on IIS 4.0 is to write a single script that has 2 functions, one to be run if one condition is true, and the other to be run if another condition is true, etc.

Posting Permissions

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