ASP.NET, Part 8: Introducing ClientIDMode
The Problem Consider a typical development situation. You’re building a page which inherits its structure from a master page or two. The page itself contains a custom user control which its own set of server-side controls in it. In this particular example, let’s have a simple table.
<%@ Control Language=“C#” AutoEventWireup=“true” CodeFile=“UserControl.ascx.cs” Inherits=“UserControl” %>
On running this page, we’ll see that the generated HTML for the table is perhaps not as succinct as we might otherwise wish. (Note that main and submain are the names of ContentPlaceholder controls in the master pages that the page containing the table is based on.)
This should generate old-style IDs for everything again as would happen in v3.5, but actually something different happens.