Click here to Skip to main content
15,915,019 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

Now I have used HTml Editor controls in asp.net then I copy paste image with text in controls then After Click submit button it is stored in table in sqlserver.

But when i try to display data in gridview with image data, Can't display iamge in gridview.

Ex:
VB
<cc1:Editor ID="edQuestions" runat="server" Width="92%" AutoFocus="false"
                                        Visible="true" Height="200px" IgnoreTab="True"/>


Here stored data in single column in sqlserver:

" <img alt="" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOsAAAB6CAIAAADRUjNkAAAXFklEQVR4nO2d VNa2bbH/ddSdVOdup0Y4QgOvOqKVddnPbtS19y/> this is the test "

Display format in gridview, but can't diplay image
<%# Eval("Questions") %>

Please anybody knows tell me.
Thanks
Posted

1 solution

What is the format the image is saved to data base? like you converting image to byte and saving/ just image path is saving to database. one or the other way you can look in to this example and get your issue solved

same issue been answered in Code project Site

how to display image from sql table in gridview?[^]

Display SQL Image MVC[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900