473,320 Members | 1,817 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

images not found

I am using VS 2008 and in my aspx page my images are showing with squigly
lines (technical term) and saying that image not found.

But when it runs it finds them fine. The images are defined:

<asp:ImageButton ID="UpQuestion" visible="true" runat="server"
ImageUrl="~/images/arrowUp.gif" style="height:16px;width:16px;
vertical-align:middle" CommandName="Up" OnClick="moveQuestionRowUp"
AlternateText="^"/>&nbsp;

<asp:ImageButton ID="DownQuestion" visible="true" runat="server"
ImageUrl="~/images/arrowDown.gif" style="height:16px;width:16px;
vertical-align:middle" CommandName="Down" OnClick="moveQuestionRowDown"
AlternateText="v"/>

Why is that?

Also, if I have the path as the following, it still says not found and in
this case doesn't display:

ImageUrl="/images/arrowDown.gif"

I thought that the "/" said you start at the root and images is in the root,
so why doesn't it work here.

Also, if I have the path as the following, it still says not found and in
this case does display:

ImageUrl="images/arrowDown.gif"

The page is in the root so I would expect it to display. But in all cases,
it says images not found - when in fact they are there.

Thanks,

Tom
Sep 16 '08 #1
5 1462
After serious thinking tshad wrote :
>
ImageUrl="/images/arrowDown.gif"
This searches for that image in the root of the site, so for instance
http://www.company.com/images/arrowDown.gif.

Your development system usually uses (virtual) subdirectories, so the
root of your site would be something like http://localhost/AppRoot/.
That image is requested as http://localhost/images/arrowDown.gif, which
probably is wrong.

You could use
ImageUrl = "~/images/arrowDown.gif";
to make sure that image is alwas requested from the root of your
*application* (instead of the *server*).

But even then: usually I (as developer) know the URL will be valid when
the complete page is shown in the browser, but VS can't figure this
out. So you can then ignore that "squiggly line".
Hans Kesting
Sep 16 '08 #2
tshad wrote:
I am using VS 2008 and in my aspx page my images are showing with
squigly lines (technical term) and saying that image not found.
What happens if you include them in the solution in the solution explorer?

N.b. If you add several thousand images, it might take several hours to
include them, during which time VS appears to be hung.

Andrew
Sep 16 '08 #3

"Hans Kesting" <ne*********@spamgourmet.comwrote in message
news:uv***************@TK2MSFTNGP03.phx.gbl...
After serious thinking tshad wrote :
>>
ImageUrl="/images/arrowDown.gif"

This searches for that image in the root of the site, so for instance
http://www.company.com/images/arrowDown.gif.

Your development system usually uses (virtual) subdirectories, so the root
of your site would be something like http://localhost/AppRoot/. That image
is requested as http://localhost/images/arrowDown.gif, which probably is
wrong.

You could use
ImageUrl = "~/images/arrowDown.gif";
to make sure that image is alwas requested from the root of your
*application* (instead of the *server*).
I agree and that was how it actually is.
But even then: usually I (as developer) know the URL will be valid when
the complete page is shown in the browser, but VS can't figure this out.
So you can then ignore that "squiggly line".
So it is a bug in VS. It should know where it is. It created the project
so it knows were the root is

And this doesn't explain "images/arrowDown.gif", it was showing is not there
which is absolutely wrong. It is supposed to start from where the page is
(and I am not using a user control here) which is in the root already as is
the images folder (which is why it works on the web page). This doesn't
even involve looking for the starting point of the path - the starting point
is where you are at.

So why does VS say it can't find it?

Thanks,

Tom
>
Hans Kesting


Sep 16 '08 #4

"Andrew Morton" <ak*@in-press.co.uk.invalidwrote in message
news:6j************@mid.individual.net...
tshad wrote:
>I am using VS 2008 and in my aspx page my images are showing with
squigly lines (technical term) and saying that image not found.

What happens if you include them in the solution in the solution explorer?

N.b. If you add several thousand images, it might take several hours to
include them, during which time VS appears to be hung.
Not sure.

I will have to check when I get home. I'll let you know.

Thanks,

Tom
Andrew

Sep 16 '08 #5

"tshad" <tf*@dslextreme.comwrote in message
news:uC*************@TK2MSFTNGP03.phx.gbl...
>
"Andrew Morton" <ak*@in-press.co.uk.invalidwrote in message
news:6j************@mid.individual.net...
>tshad wrote:
>>I am using VS 2008 and in my aspx page my images are showing with
squigly lines (technical term) and saying that image not found.

What happens if you include them in the solution in the solution
explorer?

N.b. If you add several thousand images, it might take several hours to
include them, during which time VS appears to be hung.
Not sure.

I will have to check when I get home. I'll let you know.
Just checked and I don't have include them in the folder. I noticed they
weren't showing in the images folder. When I right-clicked the folder and
hit refresh - they all showed up and the squigly lines disappeared from my
aspx page.

Thanks,

Tom
>
Thanks,

Tom
>Andrew


Sep 17 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Alec | last post by:
Newbie question. I have a database for displaying the names of bed and breakfasts searched for by the town they are in as below. <?php $result = @mysql_query ("SELECT name FROM...
11
by: Ian Davies | last post by:
Hello Im having problems displaying my images as thumbnails in a table. My code for producing the new width and height from the original image is as follows...
3
by: sviau | last post by:
any settings i need to set so that IE and other browsers cache the images properly, especially during a preload. it seems that using IE, the images are being requested each time when refresh...
3
by: Simon | last post by:
This problem has been driving me mad for months.... Seen a few posts on forums about it but no answers... No mention on MSDN etc. XP Pro SP1, VS.NET (c#) .Net framework 1.1, IIS 5.1. In a...
12
by: comp.lang.php | last post by:
index.php: // STUFF // STEP 1: imagecreatetruecolor ONLY IF GD 2.0+ SUPPORTED AND FOUND if ($this->isSuccessful && !$hasMogrified && $image && !$newImage &&...
12
by: John Kotuby | last post by:
Hi all, Maybe this is a simple problem found in ASP.NET 2.0 course 101, but I must have missed it. When I create a page in Visual Web Developer and use URLs like "/images/picture.gif " or a link...
3
by: najimou | last post by:
Hi everyone I will be having a split database, running on 2 computers via mapped drive. computer "A" will have one front end and the back end located in c: \mydatabse 2 tables have links to...
1
by: kksandeep | last post by:
i am using this three files to uplod file. i got this file from net but i think these have some error. i am new to this field plz help the script i found is some helpful but not too that i need ...
5
matheussousuke
by: matheussousuke | last post by:
Hello, I'm using tiny MCE plugin on my oscommerce and it is inserting my website URL when I use insert image function in the emails. The goal is: Make it send the email with the URL...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.