Here is a simple ASP.NET Code Snippet that Hides your AdSense by blocking or filtering your IP.
This part you would want to place before what you want to block the IP from:
<%
string strIP = Request.UserHostAddress;
switch (strIP) {
case "IP#1 here":
Response.Write("No Ad1: " + strIP + " ");
break;
case "IP#2 here":
Response.Write("No Ad2: " + strIP + " ");
break;
default:
%>
The following you place after whatever it is you want blocked from certain IPs:
Some Code here
<%
break;
}
%>
Tags:
ASP.NET Code Snippet
Block IP Address
Prevent AdSense Misclick
Reference
asp.net code snippet, block ip address, prevent adsense misclick