Conditional includes in Classic ASP - where the file may not exist on the server
        Posted  
        
            by Brent
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Brent
        
        
        
        Published on 2010-04-21T21:15:38Z
        Indexed on 
            2010/04/22
            0:13 UTC
        
        
        Read the original article
        Hit count: 692
        
asp-classic
|asp
I am currently in a situation where I have to make some additions to an application written in classic ASP using server-side JScript on IIS.
The additions that I need to make involve adding a series of includes to the server-side code to extend the application's capabilities. However, the inc files may not exist on the server in all cases, so I need the application to fall back to the existing behavior (ignore the includes) if the files do not exist, rather than generating an error.
I know that this can't be accomplished using if statements in the JScript code because of the way that SSI works, and have not come across any ways of dynamically including the code on the server side, where the files may not exist.
Does anyone know of a way to accomplish this in classic ASP? Any help would be much appreciated.
© Stack Overflow or respective owner