In short, ASP.NET 4.0, gives you more control.
- CSS friendly HTML from Server Controls by default.
- EnableViewState does not work as you expect in ASP.NET 2.0. With the new ViewStateMode property with values: Inherit, Enable and Disable you get what you expect.
- ClientIDMode with value Predictable generates shorter ID attributes and possible for humans and javascript developers to handle.
- I think Auto-Encoding is going to be valuable for EPiServer Developers. The Auto encoding blocks “<%: … %>” and the IHtmlString marker interface that ensures you do not encode a string twice.
- For SEO there are properties on Page class for MetaKeywords and MetaDescription. Also support for both 301 and 302 redirects and Routing gives Friendly URL instead of path to aspx-files.
Tags: ASP.NET, ASP.NET 4.0

![Fredrik Haglund [Photo by: Kristina Sahlén]](http://blog.fredrikhaglund.se/wp-content/uploads/2010/03/fredrik200.jpg)

No comments
Comments feed for this article
Trackback link: http://blog.fredrikhaglund.se/blog/2010/03/23/techdays-dino-espositos-asp-net-4-0-highlights/trackback/