Last post Jul 21, 2012 08:43 PM by Decker Dong - MSFT
Jul 20, 2012 07:46 AM|beckyHatton|LINK
Just a quick question. is it possible to display images in a gridview using a view in a select query instead of the table? If i use the table in the select query then image displays fine but doen't seem to work if use a view.
Any advice would be greatly appreciated.
Jul 20, 2012 10:29 AM|Mudasir.Khan|LINK
executing a command get the result in the same structure whatever the command might have been
SP, Table or View.
please check the binding there should be some problem or column name might be different
Jul 21, 2012 08:43 PM|decker dong - msft|LINK
is it possible to display images in a gridview using a view in a select query instead of the table?
Yes, you can just save the relative path of images into the DataTable, and then use image <img src='<%#Eval("ImageFieldColumnName")%>'/> and then the image will be shown onto the GridView.
Besides this, you can also use ImageField.
You can see this sample here：http://msdn.microsoft.com/en-us/library/aa479350.aspx