Images not displaying

G

Guest

Hello

I have tried putting a simple jpg onto a page. I did this by selecting Image
from the tool box. Then in the properties I selected Image Url and typed in
"App_Data/image.jpg"

It shows when I am looking at it in design, but not when I publish it, just
shows the little box like it cannot find the image.

Can anyone help please?

Thanks
James
 
J

Jeff Dillon

So if you create a hard-coded one-line HTML page with this reference, the
image displays?

And App_Data is a subdir under the location of the calling page?

c:\inetpub\wwwroot\vdir\somedir\mypage.htm

c:\inetpub\wwwroot\vdir\somedir\app_data\image.jpg

Jeff
 
J

Jeff Dillon

I meant view the resultant HTML in the browser. Right click on the page in
IE, and choose View Source

And you better be sure of the exact dir...because there inlies your problem!

Here is test code. Does this work in test.htm?

<html>
<body>
<IMG src="app_data\image.jpg">
</body>
</html>

or

<html>
<body>
<IMG src="\app_data\image.jpg">
</body>
</html>
 
G

Guest

Hi

Yeah I did view the source and the source said "App_Data/image.jpg"

The first option worked, the second with the first \ does not work.
 
G

Guest

Hi

Just noticed something odd, When I double click on the file in the FTP
folder it loads the htm file up and it displays the image fine. But, when I
type in the url to the test.htm in the address bar, it does not.

What does that mean? I have turned pretty much every security i can off.
 
Joined
Jun 25, 2006
Messages
1
Reaction score
0
App_Data can't contain images

Hi,

I had the same problem and found on an other forum that images arn't allowed to be located in App_Data, create a new folder i.e. images and place your images there and everything should hopefully work fine.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top