If you are working on ASP.NET 4.0 there is rather simple fix, just set the control property
ClientIDMode="Static"
and it will retain the ID you specified. The only exception to this is when your control is databound and needs to repeat and in which case you will have to use
ClientIDMode="Predictable"