Quote:
the aspx page has only the following code.
<asp:GridView ID="GridView2" runat="server" CssClass="GridStyle">
</asp:GridView>
You're relying on auto-generated columns. The problem is, there is no way for the grid to know whether the string returned from the database needs to be displayed as a string, an image, a hyperlink, or something else entirely.
You need to make the column an
ImageField
, or a
TemplateField
containing an
Image
control. The simplest way to do that is to set
the AutoGenerateColumns
property[
^] to
false
and manually create the columns you want to display.
Otherwise, you'd need to create a custom
GridViewColumnsGenerator[
^] class and set the grid's
GridView.ColumnsGenerator property[
^] to an instance of that class.