display image in GridView using image URL string "C:\images\abc.jpg"
-
i am using ASP.net with C# and SQL Server2005i am using dataGrid view in an website, it has a an image column which is getting imageURL from a table in database. i want to display picture through URL of such format C:\images\abc.jpg but image i not being displayed, image is displayed ig i use "images/abc.jpg" can any one tell me how to display image using "C:\images\abc.jpg"
-
i am using ASP.net with C# and SQL Server2005i am using dataGrid view in an website, it has a an image column which is getting imageURL from a table in database. i want to display picture through URL of such format C:\images\abc.jpg but image i not being displayed, image is displayed ig i use "images/abc.jpg" can any one tell me how to display image using "C:\images\abc.jpg"
I don't think is possible. When executing from server, server have accsess only from Root of your specificied server. But here is a fact. when using \ in strings, it is intended to be special char example: \n - NewLine \t - tab \\ - Display \ you have to change. C:\\images\\abc.jpg
-
i am using ASP.net with C# and SQL Server2005i am using dataGrid view in an website, it has a an image column which is getting imageURL from a table in database. i want to display picture through URL of such format C:\images\abc.jpg but image i not being displayed, image is displayed ig i use "images/abc.jpg" can any one tell me how to display image using "C:\images\abc.jpg"
You need to use virtual path only you can not user physical path in ASP.Net applications I mean you can but it will then find the file to clients hard drive.
Paras Kaneriya
The difference between genius and stupidity is that genius has its limits.