L
Lloyd Sheen
I am trying to move away from server image tags (don't need a postback) and
am having a real difficult time getting the image to show properly.
The following code is in a repeater:
<table>
<tr>
<td>
<asp:ImageButton Height="16px"
ID="ImageLeft" ImageUrl="~/Images/music-32x32.png"
AlternateText='<%# Eval("FileName")%>'
runat="server" />
</td>
</tr>
<tr>
<td>
<img alt="" id="ImageLeftPlus"
src="~/Images/music-32x32-plus.png" height="16px" />
<asp:ImageButton Height="16px"
ID="ImageLeftPlus1" ImageUrl="~/Images/music-32x32-plus.png"
AlternateText='<%# Eval("FileName")%>'
runat="server" />
</td>
</tr>
</table>
Note that image src or ImageUrl are the same for the two buttons in the
bottom tr.
Using the IE Developer Toolbar I can see the following:
The asp:ImageButton generates the follow URL:
http://localhost:57217/MusicSite/Images/music-32x32-plus.png
The img generates the following URL:
http://localhost:57217/MusicSite/~/Images/music-32x32-plus.png
WTF???
I can't make heads nor tails of what is going on. What would the correct
src for the <img> tag be or is there a way of have the imagebutton not make
postbacks??
Thanks
Lloyd Sheen
am having a real difficult time getting the image to show properly.
The following code is in a repeater:
<table>
<tr>
<td>
<asp:ImageButton Height="16px"
ID="ImageLeft" ImageUrl="~/Images/music-32x32.png"
AlternateText='<%# Eval("FileName")%>'
runat="server" />
</td>
</tr>
<tr>
<td>
<img alt="" id="ImageLeftPlus"
src="~/Images/music-32x32-plus.png" height="16px" />
<asp:ImageButton Height="16px"
ID="ImageLeftPlus1" ImageUrl="~/Images/music-32x32-plus.png"
AlternateText='<%# Eval("FileName")%>'
runat="server" />
</td>
</tr>
</table>
Note that image src or ImageUrl are the same for the two buttons in the
bottom tr.
Using the IE Developer Toolbar I can see the following:
The asp:ImageButton generates the follow URL:
http://localhost:57217/MusicSite/Images/music-32x32-plus.png
The img generates the following URL:
http://localhost:57217/MusicSite/~/Images/music-32x32-plus.png
WTF???
I can't make heads nor tails of what is going on. What would the correct
src for the <img> tag be or is there a way of have the imagebutton not make
postbacks??
Thanks
Lloyd Sheen