p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   ASP.NET 3.5 Basics (http://p2p.wrox.com/forumdisplay.php?f=351)
-   -   How to display image using gridview ? (http://p2p.wrox.com/showthread.php?t=86856)

Abhishek Kumar March 2nd, 2012 09:47 AM

How to display image using gridview ?
Dear Sir,
I would like to display image using Grid view.
Please help me.

The code is as follows.

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
PageSize="6" onselectedindexchanged="GridView1_SelectedIndexCha nged"
Height="1019px" Width="705px">
<asp:CommandField ShowSelectButton="True" ButtonType="Button"
SelectText="Purchase Book" />

<asp:Image ID= "Imagebooks" runat="server" ImageUrl='<%# Eval("BookImage")%>' Height="150" Width="120" />

<asp:BoundField DataField="BookName" HeaderText="BookName"
SortExpression="BookName" />
<asp:BoundField DataField="Price" HeaderText="Price in Dollar($)" SortExpression="Price" />
<asp:BoundField DataField="Quantity" HeaderText="Quantity Available" SortExpression="Quantity" />

Imar March 2nd, 2012 12:07 PM

And your question is what exactly? That code looks OK to me....


All times are GMT -4. The time now is 05:44 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.