Dim strPhotoPath As String = UtilClass.GetPhotosPath(intRecordID)
img.ImageUrl = strPhotoPath & "\" & DBClass.GetJobIDPhoto(intRecordID)
I tested the string and it is returning the path correctly from the server as F:\Photos\Alteri, Alan\RO42964\Job ID Photo.JPG
It works here on our server but on our customers server it only shows the red X in the image control. The only difference is that the images are on a 2nd server here but on the same server as IIS on our customers. Any ideas? Thanks.
dlchase
Member
236 Points
385 Posts
Image not displaying
Apr 04, 2012 08:24 PM|LINK
I have an image control on an asp.net page and I am setting its ImageURL property in code. Below is the Image control.
<asp:Image ID="Image1" runat="server" Height="200" Width="300" />
In the code behind I am setting it as follows:
Dim strPhotoPath As String = UtilClass.GetPhotosPath(intRecordID)
img.ImageUrl = strPhotoPath & "\" & DBClass.GetJobIDPhoto(intRecordID)
I tested the string and it is returning the path correctly from the server as F:\Photos\Alteri, Alan\RO42964\Job ID Photo.JPG
It works here on our server but on our customers server it only shows the red X in the image control. The only difference is that the images are on a 2nd server here but on the same server as IIS on our customers. Any ideas? Thanks.
mameenkhn
Contributor
2026 Points
391 Posts
Re: Image not displaying
Apr 04, 2012 08:33 PM|LINK
it should be a relative path not the absolute path, The photos folder should be inside your webapplication.
it should be like http://localhost:8449/Alteri_Alan/RO42964/Job ID Photo.JPG
assuming photos folder is your web root folder
--------------------------------------------------
Muhammad Amin
محمد امين
pierrefrc
Participant
947 Points
201 Posts
Re: Image not displaying
Apr 04, 2012 08:48 PM|LINK
Hi
Can post the implementation of method GetPhotosPath?
How do you configure your path, it's hardcode ?
SyedZohebAli...
Member
40 Points
18 Posts
Re: Image not displaying
Apr 06, 2012 04:25 PM|LINK
you need to ensure that at client side you should have same folder path.
http://zohebsumair.blogspot.in/