86 lines
2.6 KiB
HTML
86 lines
2.6 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
|
<html>
|
|
|
|
<head>
|
|
<meta HTTP-EQUIV="Content-Type" Content="text-html; charset=Windows-1252">
|
|
<title>Get</title>
|
|
<script language="JavaScript">
|
|
|
|
szNavVersion = navigator.appVersion
|
|
|
|
if (navigator.appName == "Microsoft Internet Explorer") {
|
|
if (szNavVersion.indexOf ("4.") >= 0) {
|
|
document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/spidie4.css">');
|
|
} else {
|
|
document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/spidie3.css">');
|
|
}
|
|
}
|
|
else if (navigator.appName == "Netscape") {
|
|
document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/spidie4.css">');
|
|
}
|
|
else {
|
|
document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/spidie3.css">');
|
|
}
|
|
|
|
</script>
|
|
|
|
<meta NAME="DESCRIPTION" CONTENT="Internet Information Server reference information">
|
|
</head>
|
|
|
|
<body BGCOLOR="#FFFFFF" TEXT="#000000">
|
|
<font face="Verdana, Arial, Helvetica">
|
|
|
|
<h1><a name="_get"></a>Get</h1>
|
|
|
|
<p>The <b>Get </b>method takes the name of a counter and returns the current value of the
|
|
counter. If the counter doesn't exist, the method creates it and sets it to 0.</p>
|
|
|
|
<h2>Syntax</h2>
|
|
|
|
<pre><b>Counters.Get</b>(<i>CounterName</i>)
|
|
</pre>
|
|
|
|
<h2>Parameters</h2>
|
|
|
|
<dl>
|
|
<dt><i>CounterName</i></dt>
|
|
<dd>A string containing the name of the counter.</dd>
|
|
</dl>
|
|
|
|
<h2>Example</h2>
|
|
|
|
<p>Display the value a counter with <code><%= Counters.Get(<i>CounterName</i>) %></code>.
|
|
Assign the value of the counter to a variable with <code><% countervar = Counters.Get(<i>CounterName</i>)
|
|
%></code>. </p>
|
|
|
|
<p>The following script displays the vote tally from a poll about favorite colors. </p>
|
|
|
|
<pre><% If colornumber = "1" Then
|
|
Counters.Increment("greencounter")
|
|
Else
|
|
If colornumber = "2" Then
|
|
Counters.Increment("bluecounter")
|
|
Else
|
|
If colornumber = "0" Then
|
|
Counters.Increment("redcounter")
|
|
End If
|
|
End If
|
|
End If %>
|
|
<P>Current vote tally:
|
|
<P>red: <% =Counters.Get("redcounter") %>
|
|
<P>green: <% = Counters.Get("greencounter") %>
|
|
<P>blue: <% = Counters.Get("bluecounter") %>
|
|
</pre>
|
|
|
|
<h2>Applies To</h2>
|
|
|
|
<p>Counters component</p>
|
|
|
|
<h2>See Also</h2>
|
|
|
|
<p><a href="counter3.htm"><b>Increment</b></a>, <a href="counter4.htm"><b>Remove</b></a>, <a
|
|
href="counter5.htm"><b>Set</b></a> </p>
|
|
</font>
|
|
</body>
|
|
</html>
|