An ASP.NET Controls has a ClientID property. SharePoint Controls inherit from the ASP.NET Controls. The property will give you the ID, the rendered control will have in the HTML source. There is one thing to remember:
The ClientID is valid only, if the control has been added to the Controls of the Page!
|ID **before** adding the control
|ID **after** adding the control