September 2003 - Posts

HTML Components= ASP.NET for the client

As you can see from my title, i am investigation in client side technologies in conjunction with asp.net

My short sample uses HTC to make email adresses on webpages for SPAM uncrawleable ( what a word).

First make a css class which is bounded to your label and mask the email adresse ( or code it). I have inserted some REM. Over the Bevaior i bind a htc file to the class.

<STYLE>
.my { FONT-SIZE: 0.8em; BEHAVIOR: url(rememail.htc); FONT-FAMILY: Verdana }
  </STYLE>
 </HEAD>
 <body MS_POSITIONING="FlowLayout">
  <form id="Form1" method="post" runat="server">
   <asp:Label id="lblEmail" runat="server" CssClass="my">infoREM@REMppedv.REMde</asp:Label>

Take a look into htc: Attach the documentreadyevent to a function (here called init). Read the text form SPAN (made from label) with innertext. Do some regexp replaces. Write it back. Because the css class is direct bound to span teh innertext is called direct and not like document.control.innertext blabla

<PUBLIC:ATTACH event="ondocumentready" handler="init" />
<SCRIPT language="JScript">
function init()
{
var str=innerText;
var re;
re=/REM/g;
innerText=str.replace(re,"");
}
</SCRIPT>

The result: most crawler doest execute jscript.-> wrong email adress is scanned
If crawler is very clever and execute jscript, i belive it doesnt execute htc. HTC is limited only for IE 5 and above. I also think thak 99% of the webdevelopers doesnt unterstand what happens if they take a look in the html source of the browser.

Posted by preishuber | with no comments

Setup the blog

thanks Scott! Now i am setting up the .Text blog. Nice but not easy, need some trys to start.

You can meet me at PDC

And will attend

for all of you speaking german, i have a german blog too http://www.vbmoves.de/Weblog.aspx?uid=1 which is updated more frequently.

Posted by preishuber | 2 comment(s)
More Posts