By Scott Mitchell
Price: $29.95 USD
£20.95 GBP
Cover | Table of Contents | Colophon
Function ComputeTotalWithSalesTax(curTotalLessSalesTax)
Const curSalesTax = 0.0695
ComputeTotalWithSalesTax = curTotalLessSalesTax + _
curTotalLessSalesTax * curSalesTax
End Function
http://www.4guysfromrolla.com/webtech/080199-1.shtml.http://www.microsoft.com/mind/0499/iis5/iis5.htm.http://webreview.com/pub/98/10/30/bookends/index.html.
Also, every developer should often visit Jakob Nielsen's
usability site, http://www.useit.com/.http://www.4guysfromrolla.com/webtech/082599-1.shtml.http://msdn.microsoft.com/library/psdk/iisref/eadg4d9v.htm.http://www.aspfaqs.com/webtech/faq/faqtoc.shtml#FileSystemObject.Language
directive. For example, the following
ASP snippet uses the Language directive to
indicate that JScript is the scripting language used:
<% @LANGUAGE = "JScript" %>
<%
var strQuote;
strQuote = "Hello, world!";
Response.Write(strQuote);
%>
Language directive, like all other ASP
directives, is preceded by @
. Furthermore,
directives must appear before all other ASP code. Failure to do so
will result in the following error:Active Server Pages error 'ASP 0140' Page Command Out Of Order The @ command must be the first command within the Active Server Page
Language directive is excluded (which it
commonly is), the default scripting
language
is used. When first installed, both
IIS and PWS set the default
scripting language to VBScript. The default scripting language can be
changed, though. To change the default scripting language in IIS,
visit the Internet Information Services by going to Start →
Programs → Administrative Tools → Internet Services
Manager. The web sites on your machine should be listed. Right-click
and select Properties for the web site whose default scripting
language you wish to change. A tabbed dialog box should appear;
select the tab titled "Home Directory."
Figure 2.1 shows this dialog box with the correct
tab selected.
if ... else,
switch, while,
do ... while, and
for statements — are syntactically identical
to C's.<% @LANGUAGE = "JScript" %>
<%
Response.Write("Each new-line character represents")
Response.Write("a new statement in JScript. So does a semicolon.<P>")
// This is legal code:
Response.Write("Hello, "); Response.Write("World!");
// This is not:
Response.Write("Hello, ") Response.Write("World!");
%>
Option
Explicit-type
command in JScript. To declare a variable, use the
var keyword. Variable names must begin with a
letter, an underscore ( _ ), or a dollar sign
($
); subsequent characters can be letters,
numbers, underscores, or dollar signs.http://www.activestate.com/corporate/). The
PerlScript engine can be downloaded for free from ActiveState's
web site, http://www.activestate.com.if ... elsif ...
else, for,
while, foreach, and
foreach ... until. If you are
new to Perl, I highly recommend that you obtain a copy of
O'Reilly's Learning Perl, Second Edition
by Randal Schwartz and Tom Christiansen.|
Datatype
|
Prefix
|
Description
|
|---|---|---|
|
Scalar
|
$
|
Contains simple datatypes, such as strings and numbers
|
|
Array
|
@
|
Contains a variable number of scalar elements indexed by number;
arrays are indexed starting at zero
|
http://www.python.org/download/. Be sure to
download and install both the Python interpreter and the Win32 COM
extensions. Also, you have to register the Python ActiveX scripting
engine on the web server before you can use it. Consult the online
Python documentation for more information.http://www.python.org. Extensive documentation
exists at http://www.python.org/doc/. Finding
good references on using Python with ASP is far from easy. There are
a couple of short articles available at
Python.org, but those articles are targeted for
experienced Python developers interested in learning ASP as opposed
to experienced ASP developers interested in learning Python!http://www.fastnetltd.ndirect.co.uk/Perl/Articles/PSIntro.html.http://www.asplists.com/learn/javascript.asp.http://www.asptoday.com/articles/19990316.htm.http://www.asptoday.com/articles/19990420.htm,
even demonstrates how to call VBScript functions from JScript code
and vice versa.http://www.4guysfromrolla.com/webtech/vb2java.shtml
to see some JScript translations of some of the more common and
useful VBScript formatting functions.SCRIPT
blocks execute within an ASP page, refer
to http://msdn.microsoft.com/workshop/server/feature/morqa.asp#order.<% @LANGUAGE="VBSCRIPT"%>
<%
Dim strScott
strScott = "Mitchell 'This will cause a compile-time error since the
'assignment to the string strScott is missing a
'closing quotation mark
%>
<% @LANGUAGE="VBSCRIPT"%>
<%
Dim iUndefined
iUndefined = 1 / 0 'This will cause a runtime error since the division by
'zero is undefined
%>
Server.Transfer.
http://www.yahoo.com/NotAValidURL
http://espn.go.com/NotAValidURL
http://www.4guysfromrolla.com/NotAValidURL
http://www.4guysfromrolla.com/webtech/060399-1.shtml.http://msdn.microsoft.com/workshop/languages/jscript/handling.asp.http://www.microsoft.com/mind/0499/iis5/iis5.htm.http://www.asptoday.com/articles/19990308.htm,
in a piece entitled "Error Handling in IIS 5.0."http://www.4guysfromrolla.com/webtech/061499-1.shtml.http://msdn.microsoft.com/scripting/.i
g
gi
False. IgnoreCase is also a
Boolean value, indicating whether or not a
regular expression search is case-sensitive. By default, IgnoreCase
is set to False.<% @LANGUAGE="VBSCRIPT" %> <% Dim iAnswer iAnswer = 22 / 7 'A rough approximation of pi %>
Dim
iAnswer, is
an example of static execution. When a browser visits the ASP page
that the above code snippet resides in, the first line of code is
executed, causing a memory location to be set aside to store the
value of iAnswer. The second line,
iAnswer
=
22
/
7, is an example of both
static evaluation and static execution. Initially, the expression
22
/
7 is
evaluated, returning the result 3.14285714285714.
The execution occurs when this value is stored into the variable
iAnswer.22
/
7 will change is if a developer edits the actual
ASP file by entering a new expression.(8
*
(5
/
3.5))
-
34.
Example 4.7 contains the code to create this form,
and Figure 4.4 displays the form when viewed
through a browser.<HTML>
<BODY>
<FORM METHOD=POST ACTION="SolveMathProblem.asp">
Enter a mathematical expression (like
<CODE>5 + 4 * (9 / 4 - 10.5) + 45/2</CODE>):<BR>
<INPUT TYPE=TEXT NAME=Expression SIZE=40>
<P>
<INPUT TYPE=SUBMIT VALUE="Solve this Expression!">
</FORM>
</BODY>
</HTML>http://msdn.microsoft.com/scripting/default.htm?/scripting/vbscript/doc/vbsversion.htm.http://java.sun.com/docs/books/tutorial/java/concepts/.
While the site does focus on Java technology, it contains worthwhile
articles on OOP design and concepts.http://hotwired.lycos.com/webmonkey/geektalk/97/33/index3a.html.http://msdn.microsoft.com/workshop/languages/clinic/scripting051099.asp.
This article contains a good explanation on how to use the
RegExp object with VBScript, and supplies some
basic regular expression theory.http://msdn.microsoft.com/scripting/default.htm?/scripting/vbscript/download/vbsdown.htm.