Remove 메서드는 카운터의 이름을 취하여 Counters 개체에서 해당 카운터를 제거하고 Counters.txt 파일에서 카운터를 삭제합니다.
Counters.Remove(CounterName)
CounterName
카운터의 이름이 들어 있는 문자열입니다.
다음은 Counters.txt 파일에서 카운터 hitscounter를 제거하는 코드입니다.
--- Counters_Remove.asp ---
<HTML>
<HEAD><TITLE>Voting for Colors</TITLE></HEAD>
<BODY>
<%
vote = Request.QueryString("color")
clear = Request.QueryString("clear")
' The Counters object was instantiated in Global.asa.
Counters.Increment(vote & "counter")
If Not ""=clear Then
Counters.Remove("redcounter")
Counters.Remove("greencounter")
Counters.Remove("bluecounter")
End If
%>
<H3>Vote for your Favorite Color:</H3>
<FORM NAME="Voting for Colors" METHOD="GET" ACTION="Counters_Remove.asp">
<input type="RADIO" NAME="color" VALUE="red">Red
<input type="RADIO" NAME="color" VALUE="green">Green
<input type="RADIO" NAME="color" VALUE="blue">Blue
<BR><INPUT TYPE="SUBMIT" VALUE="Submit Vote">
</FORM>
<H3>Current Vote Tally:</H3>
Red: <% =Counters.Get("redcounter") %><BR>
Green: <% = Counters.Get("greencounter") %><BR>
Blue: <% = Counters.Get("bluecounter") %>
<FORM NAME="Clear Counters" METHOD="GET" ACTION="Counters_Remove.asp">
<BR><INPUT TYPE="SUBMIT" VALUE="Clear the Counters" NAME="clear">
</FORM>
</BODY>
</HTML>