Name
Set —
objCounter
.Set(
strCounterName
, intCounterValue
)
Synopsis
The Set method allows you to create a counter in the Counters component and add its entry to the Counters.TXT file. The new counter's value is returned.
Parameters
-
strCounterName
A string that represents the name of the counter variable you wish to manipulate. This name can contain any Unicode character.
-
intCounterValue
An integer that represents the new value of the counter variable you wish to set.
Example
The following example demonstrates the use of the Set method. This
example assumes a Counters object
(gobjOptionCounter
) has been instantiated
elsewhere.
<% ' The following code sets the value of the ' FavGameCounter_Unreal counter to an arbitrary number ' (high) to inflate its perceived popularity. If it does ' not already exist, it is created and initialized to the ' value 987. gobjoptionCounter.Set("FavGameCounter_Unreal", 987) %>
Get ASP in a Nutshell, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.