Local asp.net test server won't show images

N

Neil C

Ok, this seems weird, but i think it's a permissions problem (perhaps);
but I cannot seem to access any external resources within a web
project.
When I set up a new web app, add a resource to it, edit the default
aspx with an img tag, and run it, the generated html looks fine, but
the image will not show.
I test the path to the image and i can view it in my browser, but it
will not display on the page. Just to check i gave the img a width,
height and bgcolor and right-clicked>view image and it worked fine.
Has anyone encountered this before?
 
C

Cowboy \(Gregory A. Beamer\)

No, but look at source on the page in question and see if it has a size of
1x1.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think Outside the Box!
*************************************************
 
N

Neil C

That doesn't seem to be the case. Here's the output:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Untitled Page</title>
</head>
<body>
<form id="form1">
<div>
<img style="width:200px; height:200px;
background-color:#CCCCCC;" src="image.jpg" alt="image" />
</div>
</form>
</body>
</html>

Additionally this renders as expected in design view in visual studio,
just not in execution. I don't think this is an html question...
 
N

Neil C

On top of that, it seems that the asp.net website administration tool
will not show images either... As before i can view the images wth the
path that they're linked to in the page, but they will not render
visually on the page....
Is must be the way asp.net development server is set up (or installed)
Anyone have any suggestions?
 
N

Neil C

Riiight..
Well this is totally re-produceable..

All you have to do is get firefox to block images from localhost. Then
when you view pages from you computer they won't work, voila.......

Yeah i'm annonyed.. how did this block images from localhost occur??
Angry...

Cheers to cowboy for his assistance
 
Joined
Jan 27, 2010
Messages
27
Reaction score
0
Show Tags in Design View in Visual Studio

To enable it open an aspx page and follow the following steps:

1. Click on "View"
2. Click on "Formatting Marks"
3. Click on "Show"
4. Repeat step-1 and step-2
5. Click on "Tag Marks"
Now tags will be shown in the design view.
 
Joined
Jul 10, 2010
Messages
1
Reaction score
0
Different but similar problem

i have installed IIS and in design mode i can see the image but browser doesn't show it the image path is f:\pics\1.jpg and i have hardcode this in ImageUrl as
ImageUrl="f:\pics\1.jpg" still i see small image icon in IE but no image.

plz help!!
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top