• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

ASP HELP: Include files

DocYahoo

Senior member
How can I dynamically set the location of the file?

For example, I want to use ie4.inc if the browser is IE4 or ie5.inc if the brwoser is IE5?

And w/o using include statement.

Because this doesn't work:

dim intVersion
intVersion = request.browserVersion <-- psuedo code

<!-- #INCLUDE FILE= &quot;IE&quot; &amp; intVersion &amp; &quot;.inc&quot; -->

Help ?!


 
hey, reply to my own post, nice!

After reading several articles, here is the solution: use the Server.Execute() command.

So construct the string first: strIncLocation = &quot;ie&quot; &amp; intBrowserVer &amp; &quot;.asp&quot;

then: Server.execute(strIncLocation)

The article I read mentionsed that Server.Execute is not EXACTLY the same as #INCLUDE FILE, but for my purpose, it worked fine.

Also, please note: to use Server.Execute, you'll need ASP 3.0 and IIS 5.
 
doc: next time you have an ASP question, ask train or adul, they are pretty good with ASP.






dam(FYI)
 
Back
Top