Reference Increment
The Increment method adds the value of the counter by 1, based on the name of the counter, and returns a new value for the counter. If the counter does not exist, this method creates the counter and sets its value to 1.
Grammar
Counters.Increment (CounterName)
Parameters
CounterName
A string that contains the counter value.
Example
Use the <% counters.increment (CounterName)%> to increase the value of the counter. Use the <%= counters.increment (CounterName)%> to increase and display counter values.
In order to get the value of the counter, you can use Counters.Get. To set the value of the counter to a special value, use Counters.Set.
The following code implements the online page access counter.
<p>there have been <%= counters.increment ("hits")%> visits to this Web page.
</P>
In the following example, each time a client makes a page request to the server, it uses Counters.Increment to add the counter value by 1.