C# .NET - Show image in datagridview from specified path to all records proplem

Asked By ahmed salah on 29-Aug-14 04:37 PM

Hi guys i have proplem

I have 100 employee showing in datagridview and i have path that have these pictures to all employee found in

this path

\\\\192.168.1.10\\24.10.11

what i need is to show every employee have picture in this path in datagridview as following

datagridview1

employeeNo  EmployeeName  image

555       adil          picture path from \\\\192.168.1.10\\24.10.11 related to this employee

556        wadel         picture path from  \\\\192.168.1.10\\24.10.11 related to this employee 

How to get image from specified path according to EmployeeID BY C# CODE

Robbe Morris replied to ahmed salah on 29-Aug-14 05:15 PM
Not all of your users will have access to that network mapped drive.  So, you don't want to use that as the path to the image.

Your best bet is to use an .ashx handler page that reads the bytes of the image off the mapped drive and return the contents via Response.BinaryWrite.  The handler page would be the url you'd use in the image tag.
ahmed salah replied to Robbe Morris on 30-Aug-14 01:35 AM
Thank you for reply
but i work in windows application c#
and i need image from server harddisk not from database