i have a page in which i m using grid control to display data from sql server. i have two
fields in my table.name,image in which image datatype is image.i m using an sqldatasoure for
data binding.when i run my page image not displayed in my page.only name field is displayed.
what is the problem here?give me any suggestion? thanks in advance...

i used following ASP.NET code here..

<form id="form1" runat="server">
    <div>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:uploadConnectionString %>"
            SelectCommand="SELECT * FROM [image]"></asp:SqlDataSource>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1"
            Style="z-index: 100; left: 82px; position: absolute; top: 146px" Width="270px">
            <Columns>
                <asp:BoundField DataField="name" HeaderText="name" SortExpression="name" />
                <asp:ImageField DataImageUrlField="pic" HeaderText="picture"  >
                </asp:ImageField>
            </Columns>
        </asp:GridView>
    
    </div>
    </form>

output like this:


name picture

sunset here emptybox

waterlilies empty box

u r assigning imageurl to pic which i guess is image datatype in the table.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.