VBScript and Jscript On A Server

Domain Hosting image
Web Hosting
Dedicated server
ssl certificate
Web Design image
Email

When using VBScript on the server with ASP, two VBScript features are disabled. Because Active Server Pages Scripts are executed on the server, the VBScript statements that present user interface elements, InputBox and MsgBox, are not supported. In addition, do not use the VBScript functions Create Object and Get Object in Server side Scripts. Use Server Create Object instead so that ASP can track the object instance. Objects created by Create Object or Get object cannot access the ASP built in objects and cannot participate in transactions. The exception to this rule is when you are using the Admin Objects, and when you are using Java monikers.

Case Sensitivity

VBScript is not case sensitive. For example, you can use either Request or request to refer to the ASP Request object. One consequence of caseinsensitivity is that you cannot distinguish variable names by case. For example, you cannot create two separate variables named Color and color.

JScript is case sensitive. when you use JScript keywords in scripts, you must type the keyword exactly as shown in the reference page for that Keyword. For example, using date instead of date will cause an error. In Jscript, the names of objects must be capitalized; method and property names can be any case. The case shown in this documentation for the ASP built in objects will work in Jscript commands.

VBScript

VBScript does not require variable declarations, but it is good scripting practice to declare all variables before using them. To declare a variable in Vbscript, use the Dim, Public, or Private statement. For example:

< % Dim username %>

You can use the VBScript option Explicit statement in an asp file to require variables to be explicitly declared. The option Explicit statement must appear after any ASP directives and before any HTML text or script commands. This statement only affects ASP commands that are written in VBScript; it has no affect on Jscript commands.

Jscript

Microsoft Jscript requires variable declarations only for variables that are local to a procedure, but it is good scripting practice to declare all variables before using them. To declare a variable, use the Var statement. For example:

< % var UserName; % >



Domain Name Search

www.


Copyright (C) 2007. Web Domain design hosting. All rights reserved.