Tourney Bracket Control 2.0 And XHTML

posted on 01/21/06 at 11:55:38 pm by Joel Ross

I'm in the process of upgrading the Tourney Pool Manager to .NET 2.0, and ran into an interesting issue with the Tourney Bracket Control. We struggled to figure out what was going on - it was not displaying correctly. The farther you got down in the NCAA bracket, the less aligned it was.

But we knew it could work, because we have it working just fine in our Quickstarts. So I started comparing how the output was different there compared to the page in the TPM. I eliminated the output from the bracket because it was the same. Removing content around the bracket didn't help either.

Then, I tried one other thing: I noticed that in ASP.NET 2.0, the default head tag has an XML namespace in it. So I copied that and the doc type tags over, and suddenly, the rendering worked in the TPM. Even with adding in all of the surrounding content. So I looked at what was different, and it turns out that the upgraded TPM pages had?a doc type of HTML 4.0, while newly added pages in Visual Studio 2005 have a doc type of XHTML 1.0 (transitional). That's the difference!

We use a lot of CSS and styles for our rendering now - something we didn't do in TBC 1.0. One of the side effects of that is that we now require XHTML rendering to be used.

And in case you were wondering, using XHTML rendering also allows it to display and work correctly in Firefox, something TBC 1.0 didn't do - it worked, but didn't display the lines correctly. Now, it looks the same in IE and Firefox.

Technorati Tags: | |

Categories: Develomatic