Using VBScript & JavaScript in ASP

Started by sukishan, Jul 13, 2009, 08:09 AM

Previous topic - Next topic

sukishan

Using VBScript in ASP

You can use several scripting languages in ASP. However, the default scripting language is VBScript:

<html>
<body>
<%
response.write("Hello World!")
%>
</body>
</html>

The example above writes "Hello World!" into the body of the document.

--------------------------------------------------------------------------------

Using JavaScript in ASP

To set JavaScript as the default scripting language for a particular page you must insert a language specification at the top of the page:

<%@ language="javascript"%>
<html>
<body>
<%
Response.Write("Hello World!")
%>
</body>
</html>

Note: JavaScript is case sensitive! You will have to write your ASP code with uppercase letters and lowercase letters when the language requires it.
A good beginning makes a good ending