First time here? You are looking at the most recent posts. You may also want to check out older archives or the tag cloud. Please leave a comment, ask a question and consider subscribing to the latest posts via RSS. Thank you for visiting! (hide this)

I warn you, send your child to bed before reading this code snippet:

<span id="lblUser Birthday">User Birthday</span><br>
<input type="text" name="txtUser Birthday" ID="txtUser Birthday">

OK, the HTML4 DTD allows spaces inside the NAME attribute (it’s a CDATA) but it’s one of the worst practices I ever saw (even the control’s name autogenerated by ASP.NET web forms uses $ to separate names’ parts).

And spaces are not allowed inside the ID attribute.

Pragmatists would say that IE and Firefox are pretty tolerant and eat up everything, but this is pretty scary anyway.

I didn’t dare to ask “Who wrote this code?!

Technorati Tags: ,,
posted on Wednesday, November 19, 2008 3:04 PM

Comments on this entry:

# re: Not even in my worst nightmare

Left by Ervin Ter at 11/20/2008 10:40 AM

Can't believe this is true code generated from Not a good practice.

# re: Not even in my worst nightmare

Left by Simone at 11/20/2008 11:02 AM

Not generated from ASP.NET: it's a piece of code that is put as literal inside the page

# re: Not even in my worst nightmare

Left by Ionel at 11/20/2008 9:22 PM

Simone is right - not generated from ASP.NET, the same code could be generated in JSP...:)

Comments have been closed on this topic.