There is no good way to do this. Many developers use something like this:
<style> #<%= MyControl.ClientID %> { padding:100px; } </style>
But to be honest, I'm not a big fan of this. It is very bright and fragile. Starting with ASP.NET 4.0, you will be able to control the ClientID of the element in the code, so you can specify the identifiers for the elements that, as you know, you need to configure using CSS or JS.
In the meantime, I recommend using classes. In the system I'm working on, we need classes and ID bans for any client code (CSS or JS), because it's just not worth the extra overhead. Classes can work perfectly as identifiers - nothing prevents you from having many unique (one-time) classes, and there is no real problem with this method in terms of maintainability.
Rex m source share