This is a migrated thread and some comments may be shown as answers.

physical path vs virtual path

1 Answer 193 Views
ImageGallery
This is a migrated thread and some comments may be shown as answers.
doug
Top achievements
Rank 2
doug asked on 17 Mar 2015, 08:50 PM
I'm trying to display images from another server path using ImageGallery example below: (actually code with read from database loop)  anyway, if I put the images in the wwwroot folder path it works "~\images\" but when I point to a physical path it doesn't.

Protected Sub RadImageGallery1_NeedDataSource(sender As Object, e As Telerik.Web.UI.ImageGalleryNeedDataSourceEventArgs) Handles RadImageGallery1.NeedDataSource
TryCast(sender, RadImageGallery).DataSource = GetImageGalleryData()
End Sub

Private Function GetImageGalleryData() As DataTable
Dim table As New DataTable()
table.Columns.Add("Title", GetType(String))
table.Columns.Add("Description", GetType(String))
table.Columns.Add("ImageData", GetType(String))

table.Rows.Add("Image 1", "Description", "c:\images\Bale-0301201638060.jpg")
table.Rows.Add("Image 2", "Description", "c:\images\Bale-0301201638060.jpg")

Return table
End Function


1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 20 Mar 2015, 11:42 AM
Hi Doug,

The physical path is related to the local machine of the user, so I am not sure why you would need such functionality in the first place.

If your images are outside your root directory, you need to set the full URL to the images (like http://myimageserver/image1.jpg for example).

As for the physical path, you could also take a look at the following forum post:
Hope this helps.


Regards,
Konstantin Dikov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
ImageGallery
Asked by
doug
Top achievements
Rank 2
Answers by
Konstantin Dikov
Telerik team
Share this question
or