Bookmark and Share

Programming ASP in Javascript

VBScript is the default scripting language that ASP is coded in, so if you want to specify a different scripting language you have to state which scripting language you will be using at the very beginning of your code. Below is the line of code that must be your first line of ASP code or else your page will break and you'll get a boring error message.

Advertise on Tizag.com

ASP Code:

<%@ Language="javascript" 
'The rest of your ASP Code....%>

Remember, if this isn't your first line of ASP code then everything will break.

Learning Javascript

If you don't already know javascript very well, then it is probably a good idea if you just learn VBScript instead of trying to get ASP to work with javascript. I have heard of many fellows having trouble getting ASP to cooperate properly with Javascript and there just isn't that many informative examples of programming ASP with Javascript available. Your ASP career will be much more pleasant if you simply stick with VBScript from the get go.

Bookmark and Share


Tips

All of Tizag's ASP Tutorial is written in VBScript, but if you have a good understanding of Javascript and prefer it, you should have no problem whatsoever converting our code.

Found Something Wrong in this Lesson?

Report a Bug or Comment on This Lesson - Your input is what keeps Tizag improving with time!

Advertise Here

More Tutorials!
Microsoft Office Tutorials Artist Tutorials