admin
base
com
developer
drivers
ds
enduser
inetcore
inetsrv
iis
admin
browseinfo
config
exe
iisrearc
img
admsamp
aspjava
common
custerr
help
common
fonts
htmldocs
iisnts
htm
admsamp
asp
art
adsi0aat.htm
adsi0elr.htm
adsi0ewj.htm
adsi0gmo.htm
adsi0j8l.htm
adsi1k1f.htm
adsi1np4.htm
adsi51o0.htm
adsi52wj.htm
adsi57hv.htm
adsi5eud.htm
adsi5ewo.htm
adsi5fzk.htm
adsi5ga8.htm
adsi5ius.htm
adsi5wmi.htm
adsi65yr.htm
adsi6c38.htm
adsi6pio.htm
adsi7703.htm
adsi7qpf.htm
adsi7vcf.htm
adsi91kk.htm
adsi9hb9.htm
adsi9iat.htm
aint0p0l.htm
aint1aud.htm
aint59pv.htm
aint6xf2.htm
aint735a.htm
aint7e9l.htm
aint8alu.htm
aint9055.htm
aint94dh.htm
aogu0t6f.htm
aogu2ek3.htm
aogu2wab.htm
aogu3boz.htm
aogu3cs3.htm
aogu6pkp.htm
aogu7vub.htm
aogu8syt.htm
aore05ix.htm
aore0ard.htm
aore0drm.htm
aore0ejo.htm
aore0hro.htm
aore0vhv.htm
aore0wvb.htm
aore0x0z.htm
aore0zvp.htm
aore136t.htm
aore19lx.htm
aore1jw9.htm
aore1o6d.htm
aore1p5x.htm
aore1v8z.htm
aore20mq.htm
aore2s13.htm
aore2u3p.htm
aore2xpu.htm
aore32cw.htm
aore32n9.htm
aore3945.htm
aore3cbp.htm
aore3mqv.htm
aore3q79.htm
aore3ype.htm
aore43si.htm
aore45ph.htm
aore4h6b.htm
aore4his.htm
aore4mcz.htm
aore4mum.htm
aore4qia.htm
aore4z1h.htm
aore50h1.htm
aore588k.htm
aore5e78.htm
aore5g8k.htm
aore5kmo.htm
aore5msk.htm
aore5pyr.htm
aore5ucl.htm
aore5xis.htm
aore5yzz.htm
aore5z5f.htm
aore5zz9.htm
aore60yt.htm
aore65b9.htm
aore6g11.htm
aore6r8l.htm
aore6sh1.htm
aore74dw.htm
aore77mt.htm
aore79rk.htm
aore7bg0.htm
aore7d7p.htm
aore7gpx.htm
aore7zn6.htm
aore8din.htm
aore8m5s.htm
aore8v5e.htm
aore91o3.htm
aore94th.htm
aore97cp.htm
aore9qpg.htm
apro0001.htm
apro00vn.htm
apro02d5.htm
apro02ss.htm
apro03hh.htm
apro063p.htm
apro06m1.htm
apro08o3.htm
apro0alq.htm
apro0bhh.htm
apro0blk.htm
apro0eib.htm
apro0eya.htm
apro0gkl.htm
apro0i5w.htm
apro0ir0.htm
apro0j39.htm
apro0mm1.htm
apro0nj8.htm
apro0r72.htm
apro0rqs.htm
apro0rw4.htm
apro0u1x.htm
apro0vol.htm
apro0vtw.htm
apro0wfn.htm
apro0y44.htm
apro0zxh.htm
apro12d2.htm
apro13on.htm
apro15np.htm
apro17j9.htm
apro186q.htm
apro18dh.htm
apro18mx.htm
apro19ys.htm
apro1b5f.htm
apro1bsk.htm
apro1bxh.htm
apro1cms.htm
apro1cmt.htm
apro1g9z.htm
apro1h9v.htm
apro1hir.htm
apro1iqw.htm
apro1k8j.htm
apro1k9x.htm
apro1l9v.htm
apro1shf.htm
apro1var.htm
apro1xb9.htm
apro1yr6.htm
apro1zms.htm
apro1zp0.htm
apro22hx.htm
apro236t.htm
apro252j.htm
apro252w.htm
apro26gc.htm
apro27xh.htm
apro29bs.htm
apro2an9.htm
apro2be6.htm
apro2egg.htm
apro2fzt.htm
apro2h42.htm
apro2h4i.htm
apro2icl.htm
apro2jhh.htm
apro2jtz.htm
apro2k1l.htm
apro2m3r.htm
apro2n1v.htm
apro2ofm.htm
apro2otv.htm
apro2qur.htm
apro2v53.htm
apro2wml.htm
apro2y7n.htm
apro2yd0.htm
apro2yoz.htm
apro3038.htm
apro31o4.htm
apro32b7.htm
apro33on.htm
apro33tx.htm
apro34u0.htm
apro34xl.htm
apro365j.htm
apro3679.htm
apro36p1.htm
apro39d1.htm
apro3bcj.htm
apro3c50.htm
apro3gj7.htm
apro3gmd.htm
apro3gtw.htm
apro3hym.htm
apro3jfp.htm
apro3mlv.htm
apro3nho.htm
apro3ovb.htm
apro3ppv.htm
apro3qlk.htm
apro3r50.htm
apro3usl.htm
apro3wj7.htm
apro3x10.htm
apro3z3n.htm
apro3zz9.htm
apro43jd.htm
apro4483.htm
apro45ki.htm
apro473o.htm
apro47ad.htm
apro47mt.htm
apro49f6.htm
apro4a99.htm
apro4bar.htm
apro4e3p.htm
apro4ejo.htm
apro4ied.htm
apro4j3b.htm
apro4jaj.htm
apro4kfg.htm
apro4l9h.htm
apro4li9.htm
apro4lpd.htm
apro4mcu.htm
apro4mqt.htm
apro4nxs.htm
apro4put.htm
apro4ry1.htm
apro4s9w.htm
apro4s9x.htm
apro4sab.htm
apro4syt.htm
apro4u1x.htm
apro4vxo.htm
apro4wko.htm
apro4x5x.htm
apro4xlw.htm
apro4zlg.htm
apro50z8.htm
apro52jp.htm
apro531h.htm
apro53g4.htm
apro53qc.htm
apro54th.htm
apro54u0.htm
apro5ahz.htm
apro5ak3.htm
apro5ak8.htm
apro5bhk.htm
apro5d0y.htm
apro5gs0.htm
apro5i0k.htm
apro5jj8.htm
apro5myb.htm
apro5nao.htm
apro5ndw.htm
apro5oro.htm
apro5pd0.htm
apro5q2b.htm
apro5qi0.htm
apro5sxf.htm
apro5vse.htm
apro5wv8.htm
apro5x6a.htm
apro61dg.htm
apro64br.htm
apro64vo.htm
apro64x1.htm
apro65rk.htm
apro65rn.htm
apro66pf.htm
apro68bx.htm
apro6db9.htm
apro6e9g.htm
apro6fjr.htm
apro6grp.htm
apro6j1h.htm
apro6jok.htm
apro6khg.htm
apro6oj6.htm
apro6p6c.htm
apro6ros.htm
apro6tgk.htm
apro6vxq.htm
apro6wbp.htm
apro6wbs.htm
apro6wmd.htm
apro6xb9.htm
apro6xij.htm
apro6zj9.htm
apro709w.htm
apro7183.htm
apro719q.htm
apro755x.htm
apro767i.htm
apro76b7.htm
apro76cz.htm
apro76ek.htm
apro76sz.htm
apro799g.htm
apro7ag3.htm
apro7e43.htm
apro7e9g.htm
apro7ezx.htm
apro7f1j.htm
apro7feb.htm
apro7his.htm
apro7hus.htm
apro7jfw.htm
apro7mlv.htm
apro7otg.htm
apro7p9w.htm
apro7qum.htm
apro7tmb.htm
apro7vdw.htm
apro7vg4.htm
apro7wa8.htm
apro7x9f.htm
apro7zcg.htm
apro852d.htm
apro85ir.htm
apro871z.htm
apro87p0.htm
apro87ua.htm
apro892d.htm
apro89v7.htm
apro8e5q.htm
apro8hma.htm
apro8kqh.htm
apro8l7p.htm
apro8mco.htm
apro8mr7.htm
apro8myb.htm
apro8njo.htm
apro8ods.htm
apro8p0l.htm
apro8p7y.htm
apro8s11.htm
apro8ss3.htm
apro8u91.htm
apro8v6t.htm
apro8wv9.htm
apro8zad.htm
apro92yb.htm
apro94yt.htm
apro96jp.htm
apro9ael.htm
apro9bcj.htm
apro9d2r.htm
apro9fhw.htm
apro9fla.htm
apro9gdq.htm
apro9hif.htm
apro9i5h.htm
apro9isl.htm
apro9k11.htm
apro9k85.htm
apro9l5x.htm
apro9lf4.htm
apro9lte.htm
apro9m44.htm
apro9mk4.htm
apro9nz9.htm
apro9of9.htm
apro9q43.htm
apro9q79.htm
apro9r38.htm
apro9rsp.htm
apro9rug.htm
apro9smr.htm
apro9tkj.htm
apro9vqd.htm
apro9wv8.htm
apro9zfr.htm
apro9zon.htm
aspguide.htm
asps6hmb.htm
asptut00.htm
asptut01.htm
asptut02.htm
asptut03.htm
comp0001.htm
comp0002.htm
comp0003.htm
comp0004.htm
comp00vo.htm
comp02cz.htm
comp052m.htm
comp09dg.htm
comp0g8e.htm
comp0gkt.htm
comp0hr9.htm
comp0ir0.htm
comp0mw5.htm
comp0xpg.htm
comp14fm.htm
comp1ag5.htm
comp1c37.htm
comp1cqa.htm
comp1d9v.htm
comp1g11.htm
comp1j8u.htm
comp1lma.htm
comp1q0j.htm
comp1qt0.htm
comp1vol.htm
comp20hg.htm
comp254p.htm
comp275c.htm
comp2bhw.htm
comp2m0k.htm
comp2mer.htm
comp2vc5.htm
comp2wby.htm
comp32g5.htm
comp34a4.htm
comp3790.htm
comp39lx.htm
comp3epe.htm
comp3hf8.htm
comp3u7h.htm
comp3xx0.htm
comp4290.htm
comp46lv.htm
comp4d2o.htm
comp4dk5.htm
comp4ng2.htm
comp4rzb.htm
comp4z90.htm
comp5279.htm
comp559v.htm
comp59f8.htm
comp5dtf.htm
comp5h4k.htm
comp5smd.htm
comp5z77.htm
comp6ant.htm
comp6fzo.htm
comp6hnp.htm
comp6jms.htm
comp6okl.htm
comp6ulw.htm
comp6xt0.htm
comp6yer.htm
comp735f.htm
comp7aw5.htm
comp7bsj.htm
comp7cby.htm
comp7dv8.htm
comp7g8k.htm
comp7k37.htm
comp7ohc.htm
comp7pmc.htm
comp87ub.htm
comp89h0.htm
comp8bsj.htm
comp8f3n.htm
comp8kdp.htm
comp8oa4.htm
comp8r1w.htm
comp8sdv.htm
comp8wf9.htm
comp8xv8.htm
comp9dq0.htm
dire0bz9.htm
dire5jmt.htm
dire5t0u.htm
dire7ixx.htm
dire8dr8.htm
dire92zp.htm
eadg01v7.htm
eadg12ib.htm
eadg1s9x.htm
eadg26ed.htm
eadg26pf.htm
eadg2hnz.htm
eadg2v3n.htm
eadg346f.htm
eadg39v0.htm
eadg3ctz.htm
eadg3l80.htm
eadg3r1s.htm
eadg3wqc.htm
eadg4cbp.htm
eadg4d9v.htm
eadg4n77.htm
eadg4o37.htm
eadg4whf.htm
eadg6303.htm
eadg6cbl.htm
eadg6dv2.htm
eadg6e7n.htm
eadg6isz.htm
eadg7j8u.htm
eadg7lmh.htm
eadg7lpv.htm
eadg7r5f.htm
eadg8e43.htm
eadg8fcn.htm
eadg8nlf.htm
eadg8qpj.htm
eadg8tdf.htm
eadg8v73.htm
eadg9947.htm
eadg9mp1.htm
eadg9s3d.htm
eadg9s8i.htm
glob2y90.htm
glob3gj7.htm
glob4b5f.htm
glob4f78.htm
glob5j03.htm
glob63vp.htm
glob6t84.htm
glob6zc4.htm
glob822b.htm
iiapsess.htm
iiaptran.htm
iiwaabt.htm
iiwaaspw.htm
iiwabasi.htm
iiwabs.htm
iiwachng.htm
iiwacoll.htm
iiwacomu.htm
iiwacont.htm
iiwadata.htm
iiwadbug.htm
iiwaform.htm
iiwainc.htm
iiwanew.htm
iiwaobb.htm
iiwaobu.htm
iiwaproc.htm
iiwaref.htm
iiwaref1.gif
iiwascln.htm
iiwauslw.htm
iiwavar.htm
iiwawelc.htm
perf1w13.htm
perf24dq.htm
perf4i5v.htm
perf4vsj.htm
perf6j1v.htm
perf6o37.htm
perf7xnp.htm
perf9ini.htm
scri2u91.htm
scri4bol.htm
scri8mcl.htm
vbob02lv.htm
vbob04vo.htm
vbob0b8z.htm
vbob0rvw.htm
vbob0ss4.htm
vbob0wkl.htm
vbob0z3o.htm
vbob129a.htm
vbob12d0.htm
vbob155x.htm
vbob188j.htm
vbob1d0k.htm
vbob1dtg.htm
vbob1fsi.htm
vbob1n04.htm
vbob1qzp.htm
vbob1whf.htm
vbob1wxc.htm
vbob246s.htm
vbob2rxh.htm
vbob2sis.htm
vbob2ub7.htm
vbob2w2t.htm
vbob2xf2.htm
vbob33ll.htm
vbob38aa.htm
vbob38hf.htm
vbob3wbp.htm
vbob3z77.htm
vbob4eg7.htm
vbob4fl9.htm
vbob4ht1.htm
vbob4hv7.htm
vbob51gr.htm
vbob53hj.htm
vbob53n7.htm
vbob554k.htm
vbob596b.htm
vbob5ovi.htm
vbob5pke.htm
vbob5sj8.htm
vbob5tpq.htm
vbob5uem.htm
vbob5ulw.htm
vbob5vg3.htm
vbob5vsj.htm
vbob60kw.htm
vbob61gz.htm
vbob67ol.htm
vbob6iwj.htm
vbob6j1v.htm
vbob6ugj.htm
vbob6x82.htm
vbob6zkv.htm
vbob72uc.htm
vbob742t.htm
vbob74l0.htm
vbob74tk.htm
vbob762b.htm
vbob7838.htm
vbob79ke.htm
vbob7fs5.htm
vbob7fw4.htm
vbob7m1x.htm
vbob7x83.htm
vbob7yya.htm
vbob7z78.htm
vbob84h7.htm
vbob87j9.htm
vbob8b6s.htm
vbob8bu4.htm
vbob8h10.htm
vbob8kz6.htm
vbob8my6.htm
vbob8o4z.htm
vbob8q5h.htm
vbob8rl0.htm
vbob8zw4.htm
vbob98iw.htm
vbob9aat.htm
vbob9gpx.htm
vbob9lrn.htm
vbob9pid.htm
vbob9waa.htm
xmli70z0.htm
core
tutorial
htmlhelp
misc
winhelp
default.htm
iisntw
pwsw95
sse
default.htm
htmla
htmlraid
psdksamp
scripts
sdksamp
wwwroot
default.htm
dirs
extcomp.ini
iisperf.pmc
inetstp.hlp
logtemp.sql
inc
last
lkrhash
qfetools
setup
staxinc
svcs
ui
utils
bldzip.pl
clean.bat
coffbase.txt
dirs
guids.txt
iisntw.chm
inetrel.cmd
internet.mk
k2ver.pl
make128.cmd
makefile
makefile.chi
mkdev.cmd
mksample.cmd
mkwebcat.cmd
place.inc
place51.inc
placefil.txt
placefil5.txt
project.mk
sdkdrop.bat
update.cmd
wcrel.cmd
intlwb
msmq
published
query
dirs
project.mk
loc
mergedcomponents
multimedia
net
printscan
public
published
sdktools
shell
termsrv
tools
windows
dirs
makefil0
127 lines
9.7 KiB
HTML
127 lines
9.7 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<html dir=ltr><head><title>Working with Scripting Languages</title>
|
|
|
|
<SCRIPT LANGUAGE="JavaScript">
|
|
<!--
|
|
TempString = navigator.appVersion
|
|
if (navigator.appName == "Microsoft Internet Explorer"){
|
|
// Check to see if browser is Microsoft
|
|
if (TempString.indexOf ("4.") >= 0){
|
|
// Check to see if it is IE 4
|
|
document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/coua.css">');
|
|
}
|
|
else {
|
|
document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/cocss.css">');
|
|
}
|
|
}
|
|
else if (navigator.appName == "Netscape") {
|
|
// Check to see if browser is Netscape
|
|
document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/coua.css">');
|
|
}
|
|
else
|
|
document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/cocss.css">');
|
|
//-->
|
|
</script>
|
|
|
|
|
|
|
|
<META NAME="DESCRIPTION" CONTENT="Explains how to set the primary scripting language for a Web page or application, and how to use VBScript and JScript in the ASP scripting environment."><META HTTP-EQUIV="Content-Type" content="text/html; charset=Windows-1252">
|
|
<META HTTP-EQUIV="PICS-Label" CONTENT='(PICS-1.1 "<http://www.rsac.org/ratingsv01.html>" l comment "RSACi North America Server" by "inet@microsoft.com <mailto:inet@microsoft.com>" r (n 0 s 0 v 0 l 0))'>
|
|
<META NAME="MS.LOCALE" CONTENT="EN-US">
|
|
<META NAME="MS-IT-LOC" Content="Internet Information Services">
|
|
|
|
</head>
|
|
|
|
<body bgcolor="#FFFFFF" text="#000000">
|
|
|
|
<font face="Verdana,Arial,Helvetica">
|
|
|
|
|
|
<h1><a name="H1_37779074">Working with Scripting Languages</a></h1>
|
|
|
|
|
|
<p>Programming languages such as Visual Basic, C++, and Java provide low-level access to computer resources and are used to create complex, large-scale programs. Scripting languages, however, are used to create programs of limited capability, called <EM>scripts</EM>, that execute Web site functions on a Web server or browser. Unlike more complex programming languages, scripting languages are <EM>interpreted</EM>, instruction statements are sequentially executed by an intermediate program called a command interpreter. While interpretation reduces execution efficiency, scripting languages are easy to learn and provide powerful functionality. Scripts can be embedded in HTML pages to format content or used to implement COM components encapsulating advanced business logic.</p>
|
|
|
|
<p>Active Server Pages makes it possible for Web developers to write scripts that execute on the server in variety of scripting languages. In fact, several scripting languages can be used within a single .asp file. In addition, because scripts are read and processed on the server-side, the browser that requests the .asp file does not need to support scripting.</p>
|
|
|
|
<p>You can use any scripting language for which the appropriate scripting engine is installed on your Web server. A <em>scripting engine</em> is a program that processes commands written in a particular language. Active Server Pages comes with two scripting engines: Microsoft Visual Basic Scripting Edition (VBScript) and Microsoft JScript. You can install and use engines for other scripting languages, such as REXX, PERL, and Python.</p>
|
|
|
|
<p>If you are already a Visual Basic programmer, you can immediately begin using VBScript, which is a subset of Visual Basic. If you are a Java, C, or C++ programmer, you may find that JScript syntax is familiar to you, even though JScript is not directly related to Java or C.</p>
|
|
|
|
<p>If you are familiar with another scripting language, such as REXX, Perl, or Python you can obtain and install the appropriate scripting engine so that you can use the language you already know. Active Server Pages is a COM scripting host; to use a language you must install a scripting engine that follows the COM Scripting standard and resides as a COM (Component Object Model) object on the Web server.</p>
|
|
|
|
<h2><a name="settingtheprimaryscriptinglanguage">Setting the Primary Scripting Language </a></h2>
|
|
|
|
<p>The ASP <em>primary scripting language</em> is the language used to process commands inside the <% and %> delimiters. By default, the primary scripting language is VBScript. You can use any scripting language for which you have a script engine as the primary scripting language. You can set the primary scripting language on a page-by-page basis, or for all pages in an ASP application.</p>
|
|
|
|
<h3><a name="H3_37782962">Setting the Language for an Application</a></h3>
|
|
|
|
<p>To set the primary scripting language for all pages in an application, set the <strong>Default ASP Language</strong> property on the <strong>App Options</strong> tab in the Internet Information Services snap-in. For more information, see <a href="../core/iiwarndh.htm">Configuring ASP Applications</a>.</p>
|
|
|
|
<h3><a name="H3_37781925">Setting the Language for a Page</a></h3>
|
|
|
|
<p>To set the primary scripting language for a single page, add the <code><%@ LANGUAGE %></code> directive to the beginning of your .asp file. The syntax for this directive is:</p>
|
|
|
|
<pre><%@ LANGUAGE=<em>ScriptingLanguage </em>%></pre>
|
|
|
|
<p>where <code><em>ScriptingLanguage</em></code> is the primary scripting language that you want to set for that particular page. The setting for a page overrides the global setting for all pages in the application.</p>
|
|
|
|
<p>Follow the guidelines for using an ASP directive; for more information, see <a href="iiwabasi.htm">Creating an ASP Page</a>.</p>
|
|
|
|
<p><strong>Note</strong> To use a language that does not support the <strong>Object.Method</strong> syntax as the primary scripting language, you must first create the <strong>LanguageEngines</strong> registry key. For more information, see <a href="../core/iiregovr.htm" >About the Registry</a>.</p>
|
|
|
|
<h2><a name="usingvbscriptandjscript">Using VBScript and JScript on the Server</a></h2>
|
|
|
|
<p>When using VBScript on the server with ASP, two VBScript features are disabled. Because scripts written with Active Server Pages are executed on the server, the VBScript statements that present user-interface elements, <strong>InputBox</strong> and <strong>MsgBox</strong>, are not supported. In addition, do not use the VBScript functions <strong>CreateObject</strong> and <strong>GetObject</strong> in server-side scripts. Use <strong>Server.CreateObject</strong> instead so that ASP can track the object instance. Objects created by <strong>CreateObject</strong> or <strong>GetObject</strong> cannot access the ASP built-in objects and cannot participate in transactions. The exception to this rule is when you are using the IIS Admin Objects, and when you are using Java monikers. For more information, see <a href="aogu2wab.htm">Using IIS Admin Objects</a> and <a href="iiwacomu.htm#H2_37772661">Creating an Object from a Java Class</a>.</p>
|
|
|
|
<p>For a list and description of all VBScript and JScript operators, functions, statements, objects, properties, and methods, refer to the VBScript Language Reference and JScript Language Reference. You can find this reference at the <a href="http://www.microsoft.com/isapi/redir.dll?prd=msdn&pver=6.0&ar=scripting" target=_blank><b>Windows Script Technologies</b></a> Web site.</p>
|
|
|
|
<h3><a name="includingcomments">Including Comments</a></h3>
|
|
|
|
<p>Because the processing of all scripts in ASP is done on the server side, there is no need to include HTML comment tags to hide the scripts from browsers that do not support scripting, as is often done with client-side scripts. All ASP commands are processed before content is sent to the browser. You can use HTML comments to add remarks to an HTML page; comments are returned to the browser and are visible if the user views the source HTML.</p>
|
|
|
|
<h4><a name="H4_37784996">VBScript Comments</a></h4>
|
|
|
|
<p>Apostrophe-style comments are supported in VBScript. Unlike HTML comments, these are removed when the script is processed and are not sent to the browser.</p>
|
|
|
|
<pre><%
|
|
'This line and the following two are comments.
|
|
'The PrintTable function prints all
|
|
'the elements in an array.
|
|
PrintTable MyArray()
|
|
%></pre>
|
|
|
|
<p>You cannot include a comment in an output expression. For example, the first line that follows will work, but the second line will not, because it begins with <code><%=</code>.</p>
|
|
|
|
<pre><% i = i +1 'This statement increments i. (This script will work.) %>
|
|
|
|
<%= name 'This statement prints the variable name. (This script will fail.) %></pre>
|
|
|
|
<h4><a name="H4_37785830">JScript Comments</a></h4>
|
|
|
|
<p>The <code>//</code> comment characters are supported in JScript. These characters should be used on each comment line.</p>
|
|
|
|
<pre><%
|
|
var x
|
|
x = new Date()
|
|
// This line sends the current date to the browser,
|
|
// translated to a string.
|
|
Response.Write(x.toString())
|
|
%></pre>
|
|
|
|
<h3><a name="H3_37786236">Case Sensitivity</a></h3>
|
|
|
|
<p>VBScript is not case sensitive. For example, you can use either <strong>Request</strong> or <strong>request</strong> to refer to the ASP <strong>Request</strong> object. One consequence of case-insensitivity is that you cannot distinguish variable names by case. For example, you cannot create two separate variables named Color and color.</p>
|
|
|
|
<p>JScript <em>is</em> 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 <strong>date</strong> instead of <strong>Date</strong> will cause an error. The case shown in this documentation for the ASP built-in objects will work in JScript commands.</p>
|
|
|
|
<hr class="iis" size="1">
|
|
<p align="center"><em><a href="/iishelp/common/colegal.htm">© 1997-2001 Microsoft Corporation. All rights reserved.</a></em></p>
|
|
|
|
</font>
|
|
|
|
</font>
|
|
</body>
|
|
|
|
</html>
|