RE: image not rendered when expected
- From: stcheng@xxxxxxxxxxxxxxxxxxxx (Steven Cheng[MSFT])
- Date: Thu, 04 May 2006 03:25:36 GMT
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.)
.
- References:
- image not rendered when expected
- From: Bruce
- image not rendered when expected
- Prev by Date: What you think
- Next by Date: Re: image not rendered when expected
- Previous by thread: Re: image not rendered when expected
- Next by thread: Re: Best way to use XML data source and reuse code?
- Index(es):
Relevant Pages
|