Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Apr 06, 2012 04:25 PM by SyedZohebAliSumair
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.
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
Apr 04, 2012 08:48 PM|LINK
Can post the implementation of method GetPhotosPath?
How do you configure your path, it's hardcode ?
Apr 06, 2012 04:25 PM|LINK
you need to ensure that at client side you should have same folder path.