PagePorter Class Library

FpHitCounter Class

A custom control that implements the FrontPage Hit Counter ("HitCounter") control.

For a list of all members of this type, see FpHitCounter Members.

System.Object
   System.Web.UI.Control
      System.Web.UI.WebControls.WebControl
         Parastream.Web.UI.WebControls.FpWebControl
            Parastream.Web.UI.WebControls.FpHitCounter

[Visual Basic]
Public Class FpHitCounter
    Inherits FpWebControl
[C#]
public class FpHitCounter : FpWebControl

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

FpHitCount makes use of the fpcount.exe application that is part of the FrontPage Server Extensions. The reset mechanism is different from the one used in FrontPage, and is explained here.

Normally, the the FPCountFile contains the string "FpCountFile " followed by an 11-digit string. fpcount.exe increments the count each time it reads it for rendering purposes. As it turns out, fpcount.exe is tolerant of additional information after the 11-digit hit count string. FpHitCount adds a GUID string after the count string. When the Reset property edit button is clicked in the Visual Studio .NET property window, a new GUID is calculated for the Reset property.

When the control is rendered, it compares the Reset property (which is a GUID) with the one in the FPCountFile file. If it is different (or if the FPCountFile doesn't have one), then the count is reset and the FPCountFile GUID is rewritten from the control.

Requirements

Namespace: Parastream.Web.UI.WebControls

Assembly: FpCtrls (in FpCtrls.dll)

See Also

FpHitCounter Members | Parastream.Web.UI.WebControls Namespace