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.
- The server control is data-bound and generates multiple rows. For example, you call a Web service to update a subset of the displayed rows. You have the data key values for the rows you want to update, but the id attributes of individual controls inside the data-bound control have a sequential index, and you have no way to associate the data key with the id attributes of the corresponding HTML elements.
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 newproperty and the following topics: