ASP.NET Img tag 
<p>I have a problem with how ASP.Net generates the <strong>img</strong> tag.
I have a server control like this: </p>

<pre><code>&lt;asp:Image runat="server" ID="someWarning" ImageUrl="~/images/warning.gif" AlternateText="Warning" /&gt;
</code></pre>

<p>I expect it to generate this: </p>

<pre><code>&lt;img id="ctl00_ContentPlaceHolder1_ctl00_someWarning" src="../images/warning.gif" /&gt;
</code></pre>

<p>but instead it generates this:</p>

<pre><code>&lt;img alt="" src="/Image.ashx;img=%2fimages%2fwarning.gif"&lt;/img&gt;
</code></pre>

<p>This give me errors when I execute the following js:</p>

<pre><code>document.getElementById('ctl00_ContentPlaceHolder1_someWarning')
</code></pre>

<p>Any idea why it won't generate the expected html?</p>
