Scripting Languages
You do not have to use one single
language for the entire ASP application. There is no problem with
mixing and matching for convenience. I typically use VBScript in
server-side code and JavaScript on the client, but you are not forced
to use a single language in either setting. You can, however, force
ASP to default to a specific script by using the
@LANGUAGE
preprocessor
ASP directive. ASP directives are covered in Chapter 11. For now, know that you can use the following
line of code as the first in your script to force ASP to use JScript
as the default scripting language when interpreting your code:
<%@ LANGUAGE = JScript%>
If you place this line anywhere but as the first line, you will receive an error. Also note that VBScript is the default for all server-side scripts. However, you can change this in the Application options for your ASP application's virtual directory. See Appendix D.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access