ASP.NET 2.0 and web standards

In ASP.NET for Designers, Milan Negovan points to a document at Microsoft’s ASP.NET Developer Center titled Building ASP.NET 2.0 Web Sites Using Web Standards.

The document is very long (78 printed pages), but its existence indicates that Microsoft is willing to push developers using their technology towards using web standards. I haven’t read the entire document, but it does look like there is plenty of good information on best practices in there. A couple of unfortunate oversights that I noticed while skimming through it are the common misconception that XHTML is stricter than HTML, and calling HTML elements “tags”.

Regardless, this is encouraging considering that ASP.NET developers in general aren’t widely known for building web standards compliant and accessible sites.

Posted on November 20, 2005 in Quicklinks, Web Standards

Comments

  1. I will certainly look at this. I still remember the days I tried to achieve web standards compliance using visual studio 2003. I haven’t touched the app since those frightening moments.

    Nice to see they’re finally getting the picture… Thanks for the link.

  2. Yeah, MS has done a lot of work regarding Visual Studio 2005/ASP.NET 2.0 and web standarts. That document is really a must read for ASP developers.

    “ASP.NET developers in general aren’t widely known for building web standards compliant and accessible sites”

    I dont`t think so. I think there are as many people developing PHP without knowing anything about web standarts as there are ASP ones.

  3. As in all generalizations there are some truth - the Visual studio 2002+2003 IDE’s did not encourage webstandards, in fact, most if not all built-in webcontrols (a .NET webcontrol is a component which maps to a single or multiple HTML elements which you are able to modify from the control layer of you .NET webapplication) do not produce valid HTML when rendered, there are many “broken” websites out there with the tag “powered by ASP.NET”, since developers usually tends to go down the easy way and use out-of-the-box components (note: it’s easy to produce a toolbox of standard compliant webcontrols yourself)

    I would have to say that its, in the end, up to the developer and I think that your average ASP.NET developer knows as much of webstandards as the average Ruby, Php, Jsp programmer.

    The difference being, with VS2005 getting rolled out, that the primary .NET IDE now helps the ASP.NET developer down the road of valid markup (not necessary accessible), which is one step in the right direction.

  4. November 21, 2005 by Paul D

    Ugh, I hate the code the ASP.Net developers I work with produce. It’s full of invalid id attributes with multiple underscores in them, and I’ve been told not to use hyphens in class names because ASP can’t handle them. Sometimes pages end up with two or three different (or nested!) head and body blocks. Tables are the default for positioning anything. It’s just awful.

  5. November 21, 2005 by Martin White

    I was pleased when I heard that VS 2005 would have better in built support for standards. I have been using 2003 for quite a while and have managed to make standards compliant pages with it. It is very much down to the individual developers to get off they backsides and make an effort. You can’t just blame the tools they use, and now with VS 2005 there is even less excuse.

    I came into development from a web design background, but a lot of developers don’t. Maybe they just need more encouragement and support from the designers they work with in order for them to get how important this issue is. An “us and them attitude” is no help to anyone.

  6. November 21, 2005 by Roger Johansson (Author comment)

    Of course there are ASP.NET developers who know and care about web standards. It’s just that I’ve come across so incredibly many sites based on ASP.NET where the developers don’t seem to have any interest whatsoever in best practices for client side web development.

  7. November 27, 2005 by agnain

    There is a real problem with developping ASP.NET 1 and beeing standard compliant. Because the most html code is auto-generated (every server control has it’s html code) so you have to modify this code before it is sent to the client to make it valid.
    and for some server controls, there are many difficults, just like the additionnal, invalid, used in javascript attributes of the validators. I tried to make this valid but i abandonned.

  8. Well, not all asp.net developers are unaware of standards.

    This I found on the site, when they were discussing the usage of the mime type application/xml+xhtml for strict and 1.1 XHTML.

    There is one glaring problem with the W3C’s recommendation: not all browsers recognize application/xhtml+xml. In particular, Internet Explorer (the most popular Web browser in the history of the world) does not recognize the application/xhtml+xml MIME type. Therefore, serving your XHTML pages using the recommended application/xhtml+xml MIME type is not a viable option.

    … Still it’s good they support at least xhtml 1.0 transitional.

  9. The Introduction is great, but the very next sentence: “HTML is officially outdated.” Um.

    And about 2/3 of the way down:

    It is not always possible to avoid using tags to create page layouts…. Because the ASP.NET framework must be compatible with browsers both old and new, some of the ASP.NET controls do, in fact, use tags for layout.

    Hmmm…

  10. December 29, 2005 by Roger Johansson (Author comment)

    Doug: Yeah it isn’t perfect, but considering that it’s hosted at Microsoft’s site I’d call it a step forward.

Comments are disabled for this post (read why), but if you have spotted an error or have additional info that you think should be in this post, feel free to contact me.