Find out client-side ID of HTML element created by .NET?
<p>How do I write some client-side script to access a HTML element when .NET has generated the element's ID at runtime?</p>

<p>At present I have this in my ASPX:  </p>

<pre><code>&lt;asp:Content ContentPlaceHolderID="middle_area" runat="server"&gt;
    &lt;asp:Image ID="ImageBarChart" runat="server" /&gt;
&lt;/asp:Content&gt;

&lt;script&gt;
var oImage = document.getElementById('ctl00_middle_area_ImageBarChart')
&lt;/script&gt;
</code></pre>

<p>It it working at present, but I doubt it is reliable!    </p>
