following both should work, but rather in the server control, you can just simply specify as below
where the sign of " ~ " denotes the site home and will return the URL of your application.
the reason is that since runat=server makes the control processed/randered on the server side and <%=%> signs are considered as literals and ignored
<asp:Image ID="id_image" runat="server" ImageUrl="~/App_Themes/TestTheme/images/icon/icon_track.gif" /> (server control)
<img src="App_Themes/<%= Page.Theme.ToString() %>/images/icon/icon_track.gif" alt="" /> (not a server contorl)
While TestTheme is the page theme which is hard coded.
As far as I know, if you do not require any further processing over the image, keep it as HTML control
otherwise you need to programmatically control the image URL, in the page load or may be some other event.
Image1.ImageUrl = "~/App_Themes/" + Page.Theme + "/images/icon/icon_track.gif";
regards
raheel
Raheel Hussain
--------------------------------
Blog:
http://www.dnfug.com/web/blogs/raheel/URL:
http://www.raheelhussain.com/--------------------------------
This posting is provided "AS IS" with no warranties, and confers no rights.