Tuesday, November 18, 2008

VBscript include external file


<%@ Language=VBScript %>
<%If false then>

<%Else>

<%End If>

What would the above code load?



Answer : Answer is B, bez includes are processed before ASP interpreting

The syntax in the code is invalid, since the opening delimiters(<%) do not have matching closing delimiters(%>). However,if the syntax is rectified,the code will load FunctionTwo.inc

It will include both the files.Irrespective of the condition statement asp compiles the entire script and thus both the files are included. However it executes only the FunctionTwo.inc based on the condition statement.

No comments: