The Artima Developer Community
Sponsored Link

.NET Buzz Forum
Producing XHTML with ASP.NET

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Tim Sneath

Posts: 395
Nickname: timsneath
Registered: Aug, 2003

Tim Sneath is a .NET developer for Microsoft in the UK.
Producing XHTML with ASP.NET Posted: Oct 21, 2003 3:28 AM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Tim Sneath.
Original Post: Producing XHTML with ASP.NET
Feed Title: Tim Sneath's Blog
Feed URL: /msdnerror.htm?aspxerrorpath=/tims/Rss.aspx
Feed Description: Random mumblings on Microsoft, .NET, and other topics.
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Tim Sneath
Latest Posts From Tim Sneath's Blog

Advertisement

One common criticism of ASP.NET today is that the code it produces isn't valid XHTML but instead matches the HTML 4.01 Transitional doctype. XHTML is becoming increasingly prevalent on the web due to its compatibility with XML (it's just another XML schema) and ease of transformation to support other uses (e.g. for accessibility).

It's worth bearing in mind that when ASP.NET was first revealed at the PDC in 2000, the biggest concern on everybody's mind seemed to be compatibility with a wide range of browsers. Netscape Navigator 4.x and Internet Explorer 3.x / 4.x were all still relatively common, with varying levels of support for CSS and DHTML features. One of the big "wow" features of ASP.NET was that by flicking a setting on the Document object, you could change the way controls were laid out on screen from using absolute co-ordinates in CSS to using nested tables (for the broadest compatibility). Three years on from that initial PDC release, the vast majority of browsers adhere very closely to the W3C specifications, and compatiblity concerns have been replaced by concerns over conformance to new standards such as XHTML.

One piece of good news for those of you trying to retrofit ASP.NET to provide this functionality is that the Whidbey release of ASP.NET will generate XHTML 1.1-conformant pages. In a year or so's time, this will therefore be an academic discussion.

In the meanwhile, I've recently seen two separate developments which should hopefully reduce the pain of supporting XHTML within ASP.NET. Firstly, a colleague pointed me at the following article on the ASP.NET forums, which is from a company who are producing XHTML Strict 1.0 replacements of the standard server controls (thanks, Kieran!).

Secondly, I lately came across a clever trick for cleaning up the ViewState logic emitted by ASP.NET to be XHTML compliant. Well done to Charon for coming up with this trick. (Also see the posting on Scott Galloway's blog for another example).

Hopefuly these tips will save you some bother if you're trying to get ASP.NET to do what you want. Trying to look at all of this in a positive light, it's tribute to the extensibility and modularity of the ASP.NET architecture that it's possible to retrofit this kind of functionality into the engine - imagine trying to implement these kinds of changes in ASP!

Read: Producing XHTML with ASP.NET

Topic: Hiccup... Hiccup... Previous Topic   Next Topic Topic: Dinner with Scoble

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use