ASP.NET - Image is not showing up

It sounds like you may have a URL mapping issue of some kind... For the ImageURL property try setting it to "~/Images/MyImage.png"...

Rather than storing an image directly in the App_Theme folder, create a folder for images and try to use that instead. The App_Theme directory is handled differently...


It sounds like an issue with Relative Paths in Master Pages to me. The solution is the tilda (~) character, which signifies the root folder regardless where the content page resides.

I just tested your code and it worked for me.

Have you tried it using multiple web browsers? (a caching issue perhaps?)
Are you manipulating the image in the code-behind?


I think your image files are not accessible on runtime.

Just paste this code in your web.config file and the images will be displayed.

<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</configuration>

Tags:

Asp.Net

Image