qldatasource to link data from sql to gridview
-
I’m using sqldatasource to link data from sql to gridview. Using the following SELECT itemName, itemEmail, itemPhone, itemImage, itemDate, itemPrice, itemDescription FROM Item All the data appear in the gridview except the itemimage. Itemimage should show an image from sql. I try to use imagefield in the gridview, but instead of the image a small white box with a red cross. What option should I use in the imagefield to link data from sql server.
-
I’m using sqldatasource to link data from sql to gridview. Using the following SELECT itemName, itemEmail, itemPhone, itemImage, itemDate, itemPrice, itemDescription FROM Item All the data appear in the gridview except the itemimage. Itemimage should show an image from sql. I try to use imagefield in the gridview, but instead of the image a small white box with a red cross. What option should I use in the imagefield to link data from sql server.
please show your aspx code. Did you use a TemplateField with an asp:Image control to display the image? Does the database store a BLOB field or a URL to an image?
In Word you can only store 2 bytes. That is why I use Writer.
-
I’m using sqldatasource to link data from sql to gridview. Using the following SELECT itemName, itemEmail, itemPhone, itemImage, itemDate, itemPrice, itemDescription FROM Item All the data appear in the gridview except the itemimage. Itemimage should show an image from sql. I try to use imagefield in the gridview, but instead of the image a small white box with a red cross. What option should I use in the imagefield to link data from sql server.
y_mmohd wrote:
SELECT itemName, itemEmail, itemPhone, itemImage, itemDate, itemPrice, itemDescription FROM Item All the data appear in the gridview except the itemimage. Itemimage should show an image from sql. I try to use imagefield in the gridview, but instead of the image a small white box with a red cross.
So, did you you set the image url for the imaage box. Here is an article which describe, how to show image in grid view from database, isplaying Image in Gridview from Database
cheers, Abhijit CodeProject MVP Web Site:abhijitjana.net View My Recent Article
-
I’m using sqldatasource to link data from sql to gridview. Using the following SELECT itemName, itemEmail, itemPhone, itemImage, itemDate, itemPrice, itemDescription FROM Item All the data appear in the gridview except the itemimage. Itemimage should show an image from sql. I try to use imagefield in the gridview, but instead of the image a small white box with a red cross. What option should I use in the imagefield to link data from sql server.
Dear, Thanks you for answering. I had read many articles about this topic, my problem is that i can't retrieve the image that i saved in sql server as binary to grid view. I make DataImageUrlField for the ImageField is itemImage, but instead of the image a white box with red cross appear. What is the problem? Thanks in advance....