Tuesday, June 05, 2007

Server side comments continued

Interesting, apparently the blogger has big issues with HMTL comment tags - it deleted most of my post below. I will repost/edit later.

ASP.NET Server side comments

Server-Side Comment Syntax: <%-- Comment --%>

I found this at:
http://samples.gotdotnet.com/quickstart/aspplus/doc/webformssyntaxref.aspx#comment

Why do I always forget this?

BTW - I have seen some pretty interesting bugs were a programmer (actually me) used instead of server side tags to comment out old code. This means the code actually runs server side, but gets generated inside comment tags client side. Unless you look at the source, you have no way of noticing, even if you view the client side page every day. Until one day something goes wrong with the server side code and it crashes or causes some sort of side effect, and you track it down to what you thought was dead code.