I'm having a WebForms application which used to mostly run on Postbacks. But now, I'd like to use jQuery more and more, and I would prefer to control the ClientID so that I have a true "#id" selector instead of using "input[id$=myID]".
Now, as I still like to use ASP.net Controls (I need to work with them through CodeBehind), I wonder if there's good alternatives?
The Application in question is running on SharePoint 2007 and 2010, which means a) no way to switch to ASP.net MVC and b) no inline-code inside the .ASPX file, which also means no way to dynamically build the JavaScript using $("<%= MyControl.ClientID %>). (Yes, I know that I can enable Inline Code in the web.config, but I want to avoid that)
One approach right now is to use ASP:Literals and completely build the HTML in CodeBehind, but that seems rather clumsy. Any other approach, or am I out of luck?