You use the ClientIDMode enumeration when you set the ClientIDMode property for a control. The value that you assign to the ClientIDMode property determines how the ClientID property is generated. The value of the ClientID property is rendered as the id attribute in markup, and it is the value that you use to access the control from client script. The value that you assign to the ClientIDMode property does not affect the ID property of the server control, only the id attribute of the corresponding HTML element.
The default value of ClientIDMode for a page is Predictable. The default value of ClientIDMode for a control is Inherit.
Because the default for controls is Inherit, the default generation mode is Predictable. (However, if you use Visual Studio to convert a Web project to ASP.NET 4 from an earlier version, Visual Studio automatically sets the site default to AutoID in the Web.config file.)
You can set the ClientIDMode value for all pages in a Web site by setting the pages element in the site's Web.config file. You can set the ClientIDMode value for a page in the @ Page directive.
For more information, see ASP.NET Web Server Control Identification.