Clean HTML Markup with ASP.NET 4 Web Forms and Client IDs - Visual Studio 2010 and .NET 4.0 Series

This post talk about some of the important changes made to make Web Forms in ASP.NET 4 generate clean, standards-compliant, CSS-friendly markup, and cover the work Microsofties are doing to provide better control over the “ID” attributes rendered by server controls to the client. “One of the common complaints developers have often had with ASP.NET […]

This post talk about some of the important changes made to make Web Forms in ASP.NET 4 generate clean, standards-compliant, CSS-friendly markup, and cover the work Microsofties are doing to provide better control over the “ID” attributes rendered by server controls to the client. “One of the common complaints developers have often had with ASP.NET Web Forms is that when using server controls they don’t’ve ability to easily generate clean, CSS-friendly output and markup. Some specific complaints with previous ASP.NET releases include: Auto-generated ID attributes within HTML make it hard to write JavaScript and style with CSS; Use of tables instead of semantic markup for certain controls (in particular the asp:menu control) make styling ugly; Some controls render inline style properties even if no style property on the control has been set; ViewState can often be bigger than ideal.

More info: Cleaner HTML Markup with ASP.NET 4 Web Forms - Client IDs (VS 2010 and .NET 4.0 Series)