Question

Let's assume we have a situation like:

if session("lenguage") = "ENG" then

<!--#include file="eng_page.asp"-->

else

<!--#include file="not_eng_page.asp"-->

end if

I would like to understand if the result ASP file will have booth the includes (and then only one of them will be executed) or will have only the one that depends on the session variable.

I mean, may I use it to decrease the weight of page? It could be of help if I know that some snippets of codes are included only if they really deserve it...

Was it helpful?

Solution 2

Just use Server.Execute:

If Session("lenguage") = "ENG" Then
    Server.Execute("eng_page.asp") 
Else  
    Server.Execute("not_eng_page.asp") 
End If

OTHER TIPS

Sorry, I've tried that too. Both files will be included and there will be no file size benefits. Here is an article that gives an example of how to work around it.

http://www.4guysfromrolla.com/webtech/022504-1.shtml

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top