<%@ language="C#" %>
<%
   //We need to check if the "Hits" object 
   //has never been assigned and is null.
   //If it is null, then we set it equal to 0
   if(null == Application["Hits"]) {
     Application.Lock();
     Application["Hits"] = 0;
     Application.UnLock();
   }
   int nHits = (int) Application["Hits"];
   nHits = nHits + 1;
   Application.Lock();
   Application["Hits"] = nHits;
   Application.UnLock();
%>
<html>
<body>
<h2>This site has been hit 
    <% Response.Write(Application["Hits"].ToString()); %> 
    times </h2>
</body>
</html>

Enter the website / Giriş için tıklayınız