Reset

The Reset method sets the hit count for a specified Web page to 0.

Syntax

Reset([pathInfo]) 
 

Parameters

pathInfo
Optional parameter that specifies the PATH_INFO of the Web page using the format /virtualdirectoryname/filename.asp. If this parameter is not specified, the hit count for the current page is reset.

Return Values

None.

Examples

The following example resets the page counters for the current Web page and Mypage.asp.

<%
Set MyPageCounter = Server.CreateObject("MSWC.PageCounter")
MyPageCounter.Reset
MyPageCounter.Reset("/VirtualDir1/Mypage.asp")
%>

(The following two values should be 0) <BR>
Hits to this page = <%= MyPageCount.Hits %> <BR>
Hits to Mypage.asp = <%= MyPageCount.Hits("/VirtualDir1/Mypage.asp") <BR>
 

Applies To

Page Counter Component

See Also

Hits