Re: newbie: image problems again



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: Need Enter key to trigger post
    ... When I used to use FrontPage (a few weeks ago before downloading Visual Web Developer 2008 Express), all I did was insert a button on a webpage and it defaulted to be a submit button as well as automatically created a form. ... generally display at the top of the page. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: newbie: image problems again
    ... path to the ImageUrl property. ... But the webpage doesn't display the image. ... browser displays the standard image telling that image not found / ...
    (microsoft.public.dotnet.framework.aspnet)
  • IWebBrowser2 doesnt seem to be destroyed correctly - remaining connections
    ... We have created an application which purpose is to display, ... a set of webpages displayed inside the IWebBrowser2 control. ... Each time a new item (webpage) from the list has to be played, ... Yet we tried to kill any http connections using for ex sysinternals ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)
  • Re: A new plug-in for firefox that makes *any* website display TeX formulas (including chats!)
    ... hotmail), chats, ... writing so now and then a text for my webpage. ... needs and display it on Your website. ... Is Your tool compatibel with firefox, Internet explorer, Google-groups ...
    (sci.math)
  • Re: parsing an xml response feed in firefox
    ... I am trying to parse a feed from blogger.com ... and display the contents in my webpage. ... Why not just use load with the blogger.com URL that you want to load? ...
    (microsoft.public.scripting.jscript)

Loading