A Few SEO Tips For ASP.NET Development

- September 7, 2010

ASP.NET is notorious for generating some ugly markup in the HTML it generates. The idea behind search engine readability is to get the relevant content as close to the top of the HTML Source as possible.

One of the biggest culprits in terms of unnecessary code at the top of the page is ASP.NET’s VIEWSTATE. VIEWSTATE is ASP.NET’s way of making it easier for the programmer and end user to remember certain pieces of information about a page as it is being used. It does this via a hidden form field. The best way to minimize the amount of VIEWSTATE text that appears in the HTML source code is to disable it (it’s enabled by default) and only add it when you need it. Another technique for dealing with VIEWSTATE is to move it to the bottom of the HTML source code. A while back I wrote a blog post on how to achieve this:

A technology that ASP.NET employs that “makes things easier for the developer” and offers a rich end-user experience is the AJAX Control Toolkit. The AJAX Control Toolkit lets you quickly implement things such as modal dialogs (e.g., Lightbox), form field enhancements and partial page updates. The problem with using it is that it also adds an enormous amount of code to the HTML output. The best way to minimize this is to use an alternative to the Toolkit such as jQuery or MooTools. None of the code gets auto-generated in these libraries and the end result is usually nice clean HTML source code.

If you follow the above suggestions, you can greatly reduce the amount of unnecessary code in your HTML output. One of the key points to remember is that anything ASP.NET auto-generates, though great for you as a developer, probably isn’t that good for SEO.

Comments are closed at this time.

© 2016 MoreVisibility. All rights reserved