ASP.NET server controls render HTML elements with id attributes that are often different from the ID values you assign in markup or code. The id attributes are generated by concatenating a server control’s ID with the IDs of any container controls it is in (except the page). Data-bound controls that render multiple rows also add a sequential index to make the elements in each row unique.
ASP.NET 4 provides a way to solve both of these problems. In ASP.NET 4 you can specify that the id attributes of HTML elements in rows of data-bound controls include the data key values instead of sequential indexes. And you can specify that the id attributes are generated without prefixing the IDs of container controls.
For more information, see the documentation for the new Control.ClientIDMode property and the following topics:
-- Tom DykstraASP.NET User EducationThis posting is provided "AS IS" with no warranties, and confers no rights.
Give Your Feedback on the Documentation
Help us improve the developer documentation by taking the Visual Studio and .NET Framework Content Survey. This survey will give us a better understanding of the type of applications you are developing as well as how you use Help and how we can improve it. The survey takes only 10 minutes, and we appreciate your feedback