In all asp books it is mentioned that ASP does not have conditional includes. But i wrote a very simple code and could not relate the theory with the results i got. Here is my code:
Code:
<%
'BEGIN Code "inc.asp"
dim var
var=21
if var<20 then
%>
<%
else
%>
<%
end if
'END code inc.asp
'BEGIN CODE "inc1.asp"
Response.write "Inside inc1.asp"
'END CODE "inc1.asp
'BEGIN CODE "inc2.asp""
Response.write "Inside inc2.asp"
'END CODE "inc2.asp"
%>
When i run "inc.asp", the result i get is "Inside inc2.asp"
and when i reverse the condition then i get "Inside inc1.asp"
Morever if we go by theory then the include directives are processed earlier than the ASP code, hence both the files should be included prior and should diplay both the lines.
This is a fundamental question. Please clarify.
Thanks in advance.
Vinay