RE: image not rendered when expected

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi Bruce,

As for the image rendering issue, I agree with other member's suggetion
that we need to use http based web url to reference the image source in web
page instead of local physical file path. Physical path is not accessible
for pages published over internet web site/virtual directory. Therefore,
for your scenario, I think you can consider the following options:

1. Is it possible that you move the temp image file folder under your web
application's application root folder or that folder is alreay under such
place. Thus, we can use http based full url path to reference those temp
images. Or we can also use relative path for images. In addition, for
ASP.NET server control, there is a trick that we can use "~/..." style url
to reference the ASP.NET application's root dir. So if we put the temp
image dir under application's root dir, we can set our Image server
control's url like below:

ImageBox.ImageUrl = "~/tempImagedir/xxx.gif";


2. for dynamic created or retrieved images, we can also use httphandler to
expose it so that our page can reference that dynamicc generated image
through the httphandler's url. e.g:

<img src="myimageHandler.img?imgid=xxxxx" />

And here are some good tech article discussing on use httphandler to output
image content:

#A simple ASP.NET photo album
http://weblogs.asp.net/bleroy/archive/2005/09/08/424714.aspx

#Using ASP.NET HTTP Handlers to create a photo album
http://www.microsoft.com/belux/msdn/nl/community/columns/desmet/httphandler.
mspx

In addition, for ASP.NET developing, you can have a look at the following
websites since there're many good resource there:

http://msdn.microsoft.com/asp.net/

http://www.asp.net/Default.aspx?tabindex=0&tabid=1

Hope this helps.

Regards,

Steven Cheng
Microsoft Online Community Support


==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================


This posting is provided "AS IS" with no warranties, and confers no rights.



Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)








.



Relevant Pages

  • Re: Une autre tuerie au US..
    ... Tu n'as qua faire une recherche pour mes messages qui contiennent "http" ... tu demontre TON ignorance de la loi ... donne Guncite comme premiere reference, ...
    (soc.culture.quebec)
  • Adding web service references for both HttpSoap and HttpGet
    ... SOAP and HTTP GET protocols. ... Whan I add a reference to my service in VS.NET ... base class, but I can not see how to generate an instance of one when I have ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: How do I assign a hyperlink to a web form Submit button?
    ... Reference: How to publish a Publisher web in HTTP: ... uploading has changed with the introduction of IE7 and Vista. ...
    (microsoft.public.publisher.webdesign)
  • Re: Fileupload using MFC
    ... thru HTTP? ... just for reference. ... "eRiva Systems" - Where Technology Meets Life, ...
    (microsoft.public.pocketpc.developer)
  • Read/Write to folder *above* site root
    ... I need to read/write .jpg files in a folder *above* the current site's root. ... If MapPath is the way to go, then how can I reference the desired folder as ...
    (microsoft.public.dotnet.framework.aspnet)