Re: newbie: image problems again



The path is
C:\Documents and Settings\Jeff\My Documents\Visual Studio
2005\WebSites\BN\Images\Fullsize\test.jpeg

I've checked and path is correct, but the path contains spaces....

I'm not sure about it but maybe the browser need to know if this is a
picture ("image/thumb")???




Jeff





"V" <vaibhav.gadodia@xxxxxxxxx> wrote in message
news:1152051114.522719.324780@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi Jeff,

I am not sure what your problem is, but try one of these two things:
1. If you are using something like VS.Net, then simply try to locate a
test image using the properties grid of the Image Control. And then try
to run your page and see if it works.

2. try printing the path you are trying to assign to the ImageUrl
property by using a Response.Write() from the code behind.
So basically Response.Write(Server.MapPath("~\.....

I have a feeling you are doing a bit too much in trying to assign a
path to the ImageUrl property.

- V

Jeff wrote:
Hey

it looks like Profile.UserName is empty...
But this code doesn't work either:
imgPicture.ImageUrl = Server.MapPath("~/Images/Fullsize/test.jpeg");

I've also tryed this (setting it directly in the source, not the code
behind):
src='<%# Eval("~/Images/Fullsize/test.jpeg") %>'
Without any success....

any suggestions?

Jeff


"Matthias Pieroth" <piermat2001@xxxxxxxx> wrote in message
news:e8elch$p0k$02$1@xxxxxxxxxxxxxxxxxxxx
Hi Jeff,

does this variable "Profile.UserName" really exist when you try to load
the image. Did you place an exception-handler around the
loading-method?

Bye,

--
Matthias Pieroth
www.codegod.de - The Page for .NET-developers


"Jeff" <it_consultant1@xxxxxxxxxxxxxxxxxx> wrote in message
news:%23qlAzL5nGHA.1808@xxxxxxxxxxxxxxxxxxxxxxx
hey

asp.net 2.0

my problem is that on a webpage am I trying to dynamically display the
image a user has uploaded. But the webpage doesn't display the image.
The
browser displays the standard image telling that image not found /
broken
image link etc....

This is the code which saves the image to hard drive...:
fullsizeImage.Save(Server.MapPath("~/Images/Fullsize/" +
Profile.UserName
+ ".jpeg"));

This is my code for displaying the image, it's in Page_Load event of
webpage:
imgPicture.ImageUrl = Server.MapPath("~/Images/Fullsize/" +
Profile.UserName + ".jpeg");

The image exist in that folder

Any suggestions to this error?

Jeff






.



Relevant Pages

  • Re: newbie: image problems again
    ... path to the ImageUrl property. ... does this variable "Profile.UserName" really exist when you try to load ... But the webpage doesn't display the image. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: 1W Luxeon Headlight
    ... Exploder cannot display the webpage" message. ... Is there some browser ... configuration trick to it? ...
    (rec.bicycles.tech)
  • RE: Open Excel in a browser without changing URL
    ... Then display this Excel instance within the current ... How do we set the content of the webpage to display this. ... > just want excel stuffed back into my browser. ...
    (microsoft.public.excel.misc)
  • "index.htm" displays on browser
    ... my website displays "index.htm" at the top of the webpage ... and it doesn't display "index.htm" in the preview browser. ...
    (microsoft.public.frontpage)
  • Re: displaying images in war files
    ... The images aren't being displayed in the webpage along with all the ... displayed in a browser! ... The URL's I enter for the image that doesn't display is ...
    (comp.lang.java.programmer)

Quantcast