W3C Validation for ASP.NET Data Controls
If you've had the
W3C Validator curse your ASP.NET 2.0 code for not being XHTML, it may not be your fault. The ASP.NET engines sees the W3C validator as
down-level browser and renders non-XHTML compliant code. Your code is most likely fine. The problem is with ASP.NET.
Getting ASP.NET to Play Nice with the W3C
1- Select ADD New Item to your Project or Website.
2- At the bottom of the list of choices is a
Browser file. Select that and name it W3C.browser.
3- Visual Studio will ask if it can create an App_Browsers folder. Give your blessing and proceed.
3- Visit
iDunno.org and copy the .browser text linked from that post and paste it onto your newly created W3C.browser file.
4- Upload the new folder and file.
5- Now retest with the W3C.
Your page should now validate. If it fails, it is most likely your fault and no longer the fault of the ASP.NET engine.
Labels: SEO, W3C, XHTML
posted by MAS on Feb 26,2008