Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Basics
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 3.5 Basics If you are new to ASP or ASP.NET programming with version 3.5, this is the forum to begin asking questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old March 2nd, 2012, 08:47 AM
Authorized User
Points: 265, Level: 5
Points: 265, Level: 5 Points: 265, Level: 5 Points: 265, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2010
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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">
<Columns>
<asp:CommandField ShowSelectButton="True" ButtonType="Button"
SelectText="Purchase Book" />
<asp:TemplateField>
<HeaderTemplate>Book</HeaderTemplate>

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



</asp:TemplateField>
<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" />
</Columns>
</asp:GridView>
  #2 (permalink)  
Old March 2nd, 2012, 11:07 AM
Imar's Avatar
Wrox Author
Points: 71,768, Level: 100
Points: 71,768, Level: 100 Points: 71,768, Level: 100 Points: 71,768, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,033
Thanks: 80
Thanked 1,582 Times in 1,559 Posts
Default

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

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Upload image-create & save thumbnail-display image angshujit ASP.NET 2.0 Professional 6 July 11th, 2013 10:34 PM
gridview image display Sheraz Khan ASP.NET 2.0 Basics 1 September 2nd, 2007 11:37 PM
Display image in gridview Sheraz Khan ASP.NET 2.0 Professional 0 August 30th, 2007 10:36 PM
GridView doesn't display bnorg ASP.NET 2.0 Professional 1 December 1st, 2006 09:14 PM
How to Display the image from the image field. mikeparams SQL Server 2000 1 October 29th, 2004 02:23 AM



All times are GMT -4. The time now is 08:54 AM.


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