Get a controls full ClientID from just ID in asp.net (client side)
<p>This problem is the bane of my asp.net coding life.</p>

<p>I have a control, in code, and I want to get its full ClientID but I cannot until I add it to the page. </p>

<p>However I cannot add it to the page yet. I want to add some javascript to the onclick.</p>

<p>I can add something like "myMethod(this)" to the onclick, which is great and sidesteps the problem, but if I want a select all button for example, that runs "myMethod(theItem); myMethod(theItem2); myMethod(theItem3)" then I can no longer use 'this'.</p>

<p>I can't do "myMethod(document.getElementByID('" + myObject.ClientID + "'))'" or whatever either, because the ClientID isn't set yet.</p>

<p>So is there a javascript method that I can paste into my page that will find the element from its ID (ClientID and ID are the same before it is added to the page)?</p>
