I have a Kendo grid that displays images in a column correctly if the images are stored on my machine.
@(Html.Kendo().Grid<ProjectName.Models.SomeModel>() .Name("grid") .Columns(columns => { ... columns.Bound(c => c.Image).ClientTemplate("<img src='c:/pics/" + "#=Image#' alt='image' Title='image' height='24'/>").Title("Image"); })
So, this correctly displays the images that are stored on my local hard drive in the path c:/pics . But now I need to show the images that are stored on a specific server, and not on the c:/pics folder on my machine.
I tried replacing this bit here:
src='c:/pics/"
with these options:
src='\\999.99.99.999\ProjectName\Images\' src='\\\\999.99.99.999\\ProjectName\\Images\\' src='http://999.99.99.999/ProjectName/Images/' src='999.99.99.999/ProjectName/Images/'
But none of them work.
* Please note that 999.99.99.999 is fictitious, I insert the real IP address there.
How to set the image source for the IP address of another computer?
EDIT:
If I have an image tag in any other part of the View, it works fine, for example:
<img src="\\999.99.99.999\ProjectName\Images\somepic.jpg" alt="whatever" />
But inside the ClientTemplate for a column in the grid, I get backslash errors, so I also tried double backslashes.
source share