Welcome! and rules
Joel on Software
xhtml doesn't validate
i'm using C# to as the code behind for a webform.
For your own sanity, stop trying to do XHTML with ASP.NET's built-in controls. Actually, for your own sanity, stop doing XHTML period. It's a pointless hack anyway.
How is xhtml a "pointless hack"? It's a simple variation of HTML that conforms to the rules of XML (versus HTML which is 95% there), and the given HTML schema, and gives the greatest probability of no cross-platform problems. I think the only "pointless hack" is non XML validating HTML.
XHTML is actually illegal SGML, because of the tag soup issues with self-contained tags like BR (placing a space between the tag and the / is the specific issue). It's sent down with a type of "text/html" and is thus always treated as tag soup.
I found an interim solution anyway to my problem...
XHTML is not worthless. It makes it much easier for programmatic access to your content later. It also makes it easier to identify where the invalid code is when running through a validator (contrasted by the fact that it's harder to get it to validate as XHTML, until you get in the habit of writing XHTML all the time).
Fog Creek Home