M
mich_stone
Dear world,
I have an IMAGE control placed on my .aspx page with its ImageUrl
property not set.
In my code, i am setting it equal to something using the following
statement
img.ImageUrl = Server.MapPath ("usedIcons/AssignAccess/" +
reader["sImage"].ToString ());
where reader as the name implies is a DataReader object reading a value
from the database.
The funny part is, when I run the code in LOCALHOST mode, it works
perfectly. But it was an embarassing experience for me, when I finally
deployed on server and asked my client to try from their remote client
machine. THE IMAGE DID NOT LOAD. All such images had the usual "X" on
them.
Why does it work on LOCALHOST, but not when viewing from a remote
client?
My doubts in case it helps you to help me:
1. Is Server.MapPath the right way to do it?
2. Is there any place in the document where this code should be kept?
3. I will be shocked if the answer to this one is "yes". "IS THE
BROWSWER LOOKING FOR THE IMAGE ON THE CLIENT MACHINE RATHER THAN ON
SERVER?"
Thanks a lot...
Michelle Stone
I have an IMAGE control placed on my .aspx page with its ImageUrl
property not set.
In my code, i am setting it equal to something using the following
statement
img.ImageUrl = Server.MapPath ("usedIcons/AssignAccess/" +
reader["sImage"].ToString ());
where reader as the name implies is a DataReader object reading a value
from the database.
The funny part is, when I run the code in LOCALHOST mode, it works
perfectly. But it was an embarassing experience for me, when I finally
deployed on server and asked my client to try from their remote client
machine. THE IMAGE DID NOT LOAD. All such images had the usual "X" on
them.
Why does it work on LOCALHOST, but not when viewing from a remote
client?
My doubts in case it helps you to help me:
1. Is Server.MapPath the right way to do it?
2. Is there any place in the document where this code should be kept?
3. I will be shocked if the answer to this one is "yes". "IS THE
BROWSWER LOOKING FOR THE IMAGE ON THE CLIENT MACHINE RATHER THAN ON
SERVER?"
Thanks a lot...
Michelle Stone