Re: newbie: image problems again
- From: "Jeff" <it_consultant1@xxxxxxxxxxxxxxxxxx>
- Date: Wed, 5 Jul 2006 01:18:45 +0200
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
.
- Follow-Ups:
- Re: newbie: image problems again
- From: V
- Re: newbie: image problems again
- References:
- newbie: image problems again
- From: Jeff
- Re: newbie: image problems again
- From: Matthias Pieroth
- Re: newbie: image problems again
- From: Jeff
- Re: newbie: image problems again
- From: V
- newbie: image problems again
- Prev by Date: Re: newbie: image problems again
- Next by Date: Accessing input fields declared outside the form
- Previous by thread: Re: newbie: image problems again
- Next by thread: Re: newbie: image problems again
- Index(es):
Relevant Pages
|