Sun Chili!Soft ASP Sun Chili!Soft
ASP Sun Microsystems

 

ASP Counters Component Set Method

The Set method takes the name of a counter and an integer, sets the counter to the value of the integer, and returns the new value. If the counter doesn't exist, Counters.Set creates it and sets it to the value of the integer.

Arguments: ASP Counters Component Set Method

CounterName

A string containing the name of the counter.

int

The new integer value for CounterName.

Examples: ASP Counters Component Set Method

The following code resets the hit counter pageHits to 0:

<% Counters.Set(pageHits, 0) %>

Copyright 2002 Sun Microsystems, Inc. All rights reserved. Legal Notice.