Microsoft KB Archive/825532

= How to create a page and add a hit counter in SharePoint Designer 2007 and in FrontPage 2003 =

Article ID: 825532

Article Last Modified on 1/24/2007

-

APPLIES TO


 * Microsoft Office SharePoint Designer 2007
 * Microsoft Office FrontPage 2003

-







For a Microsoft FrontPage 2000 version of this article, see 309008.



For a Microsoft FrontPage 2002 version of this article, see 318275.



SUMMARY
This article describes how to set up a Web page with a hit counter by using Microsoft Office SharePoint Designer 2007 or by using Microsoft Office FrontPage 2003.



How to create a page and to add the hit counter
To create a page and to add a hit counter to the page, follow these steps:
 * 1) On a Web server that is running Microsoft Internet Information Services (IIS) or Microsoft FrontPage Server Extensions 2002, start SharePoint Designer 2007 or FrontPage 2003, and then open a Web page.
 * 2) Start a new page. To do this in SharePoint Designer 2007, click the New Document button on the toolbar.

To do this in FrontPage 2003, click the New Page button on the toolbar.
 * 1) In Page view at the bottom of the document window, click Design.
 * 2) Put the insertion point where you want to create the hit counter.
 * 3) On the Insert menu, click Web Component.
 * 4) Under Component type, click Hit Counter.
 * 5) Under Choose a counter style, double-click a hit counter style, and then click Finish.
 * 6) To set the counter to a specific number, click to select the Reset counter to check box, and then type the number.
 * 7) To display a fixed number of digits in the hit counter, click to select the Fixed number of digits check box, and then type the number.

For example, to display the hit counter as &quot;00#&quot; instead of as a single or double digit, click to select the Fixed number of digits check box, and then type 3.
 * 1) Click OK.

Note To add a hit counter to your Web site, your site must be located on a IIS server that is running Microsoft FrontPage 2002 Server Extensions, Microsoft SharePoint Team Services version 1.0, or Microsoft Windows SharePoint Services. Ask your Web server administrator or Internet service provider (ISP) whether your server is running these technologies.

How to use the hit counter on the page
To use the hit counter on the page, follow these steps:
 * 1) Put the insertion point before the hit counter object on the page.
 * 2) Type You are visitor followed by a space.

How to save and to preview the page
To save and to preview the page, follow these steps:
 * 1) On the File menu, click Save.
 * 2) Name the file CounterText.asp, and then click Save.
 * 3) On the File menu, point to Preview in Browser, and then specify the option that you want.
 * 4) Click Preview.

If you refresh the page in your browser, you will see the hit count value increment.

Note Because the output from the hit counter object is text, the hit counter changes when you change the fonts and colors for the page.

How to reset the hit counter
To reset the value of the hit counter, follow these steps:
 * 1) In Page view, at the bottom of the document window, click Design.
 * 2) Double-click the hit counter.
 * 3) Click to select the Reset counter to check box, and then type a number in the box.
 * 4) Click OK.

Additional query words: inf fp2003 spd2007 spd

Keywords: kbhowto KB825532

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.