Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Microsoft: ASP (Active Server Pages) FAQ

ASP 101

ASP: VBScript vs. JavaScript by Dynapen
Posted: 23 Sep 02 (Edited 15 Apr 03)

As someone who has recently dealt alot with the topic in my own programs, it seems reasonable that other may have the same questions I did.

You can write ASP in JavaScript

Most people who write ASP write the server side programming in VBScript, and use JavaScript for the client side. While this is a very functional way, and often times easier way to do it, it is not the only way.

Again, You can write ASP in JavaScript
(or JScript if you are using IIS).

ASP really is only a collection of objects,methods, properties that apply to certain server objects that the webserver can utilize. How you choose to access these objects is up to you.


response.write "Test" will work in VBScript.
Response.Write ('Test'); in JavaScript.

The Response object and it's Write method are what is ASP. How you reference them is dependent on the language (i.e.Case Sensitivity, semicolons, etc.....)

The key is to separate the differences between what is ASP and what is the language.

A recent example is use the now() function in VBScript.

myvariable = now() (VBScript)
myvariable = getDate(); (JavaScript)

This is because the date function is dependent on the lanauge not on ASP.

Bottom line is, ASP can be done in a large variety of languages. And while VBScript is the most common (Becuase Microsoft pushes ASP vice JSP) it is not the only option. So you don't have to learn a new scripting language to utilize the power of ASP. You just have to learn how to adapt it's objects to your language of choice.

As a addition(becuase someone requested some more examples) here you go

Accessing the Request Object

All the real difference here is that becuase JavaScript is case sensitive, you need to watch that.

Alot of people are apparently also confused by differentiang between client and server side script

Client Side:
     <script language="JavaScript">
         alert('This is a test'):

Notice, the alert command and the document object can only be referenced on the client side. But again, these will always be in script tags like those shown above.

Server Side:
         if (Request.Form("name")) {
            Response.Write ("This is a test");

Server side content looks much like it would with VBScript. Again, the main part is learing what is actually part of the ASP Server Objects, and what is the language used to access those.

If you have any question please let me know. And as I come across new things I will make sure to put them out here for you.

Back to Microsoft: ASP (Active Server Pages) FAQ Index
Back to Microsoft: ASP (Active Server Pages) Forum

My Archive

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close