I used Visual Studio .NEt 2003 to develop a web form in which there is a bmp
format image. I used WebControls.Image in Design and set ImageUrl property
field to file:///C:\Inetpub\wwwroot\Demo\webimages\b2pentagons2.bmp
Any problem about it?
How to make a change for it?
Thanks
David
George Ter-Saakov - 13 Sep 2007 19:48 GMT
Do you think client's machines have that path
C:\Inetpub\wwwroot\Demo\webimages\b2pentagons2.bmp
....
George
>I used Visual Studio .NEt 2003 to develop a web form in which there is a
>bmp
[quoted text clipped - 8 lines]
>
> David
Mark Rae [MVP] - 13 Sep 2007 19:51 GMT
>I used Visual Studio .NEt 2003 to develop a web form in which there is a
>bmp
> format image. I used WebControls.Image in Design and set ImageUrl property
> field to file:///C:\Inetpub\wwwroot\Demo\webimages\b2pentagons2.bmp
>
> Any problem about it?
Yes - it doesn't exist on the client machines...
> How to make a change for it?
Don't use a hard-coded fully-qualified filespec - use a relative path
instead e.g.:
"../webimages/b2pentagons.bmp"

Signature
Mark Rae
ASP.NET MVP
http://www.markrae.net
david - 13 Sep 2007 19:58 GMT
Thank you.
David
> >I used Visual Studio .NEt 2003 to develop a web form in which there is a
> >bmp
[quoted text clipped - 11 lines]
>
> "../webimages/b2pentagons.bmp"
Peter Bromberg [C# MVP] - 13 Sep 2007 19:52 GMT
the image path needs to be an http- addressable virtual or absolute url, eg.
mageUrl="webimages/b2pentagons2.bmp" -- or --
imageUrl = "http://yourserver/webimages/b2pentagons2.bmp"
a "FILE:///..." directive means "look for this on THIS machine's hard drive".
-- Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com
> I used Visual Studio .NEt 2003 to develop a web form in which there is a bmp
> format image. I used WebControls.Image in Design and set ImageUrl property
[quoted text clipped - 7 lines]
>
> David
david - 13 Sep 2007 19:58 GMT
Thanks.
David
> the image path needs to be an http- addressable virtual or absolute url, eg.
> mageUrl="webimages/b2pentagons2.bmp" -- or --
[quoted text clipped - 19 lines]
> >
> > David