Click here to Skip to main content
15,890,043 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys,

I have try'd to google some help and search this forum, but havn't figured it out yet... I can't figure why my image banner doesn't display, when I start Debugger (compile) and run it local...The image code is as following:

XML
<asp:image id="Image2" runat="server" imageurl="~/App_Data/avatar.png" alternatetext="Error!"/>
</asp:image>


Its shown in a tabel row, or in other words, it should have been shown in a tabel row :)

Hope that some with a little more experience can help me out here :)
Best Regards


Solution:
I added a image folder to my solution, but for getting the image shown, I had to add the ~ to the URL.
Posted
Updated 23-Mar-10 1:29am
v12

Have you using server.Map path for the image path ... ?

try with the following tag
XML
<asp:Image ID="Image1" runat="server" ImageUrl="~/icons/globe1.JPG" />


<img src="icons/globe1.JPG" />


regards
koolprasad2003 :)
 
Share this answer
 
All I did was using the Drag&Drop tools asp:image, and my image is located in Web application folder named: "App_Data".

Answer #1, try'd your suggestions, but couldn't get it to work. Not even the img tag.
 
Share this answer
 
Please don't push 'answer' if you're not posting the answer. Edit your post to add detail.

You need to consider doing some actual coding, not using drag and drop. App_data is not a good place to store your images. Also, when you push F5, I don't think this will work b/c the built in web server places the web root one level too high. You're better off using relative paths ( remove the ~ )
 
Share this answer
 
Hello,

Add an image folder to your solution.
In table use:
<tr> <td><img src="image/img02.jpg" alt="image" /> </td></tr>

Hope this will be helpful.
 
Share this answer
 
v4
just use ../ instead of ~/ sign.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900