Parastream™ PagePorter™

Hit Counter

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

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 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.

Public Instance Properties

Property Summary
Digits Gets or sets the number of digits to display.
Image Gets or sets the image to use for the display. Only valid if Rendering is Graphics. The value may be one of the following for its associated image:

0.

1.

2.

3.

4.

ImageUrl Gets or sets the custom image URL to use for the display. Only valid if Rendering is Graphics.
Rendering Specifies how the link bar is rendered:
  • Graphics – Graphical rendering.
  • Text – Plain text rendering.
Reset Gets or sets the value that will reset the hit counter.
ResetValue Gets or sets the value that the hit counter will be set to if it is reset.

See Also

Web Controls