At run time, the ListView control replaces the placeholder with the content that is defined for each item in the ItemTemplate and AlternatingItemTemplate templates.
Main Topics
Browse All TopicsWhat is the difference and what are these placeholders for?
<center>
<asp:ListView ID="ListView1" GroupItemCount="4" runat="server" DataKeyNames="img_id"
DataSourceID="SqlDataSourc
<LayoutTemplate>
<asp:PlaceHolder ID="groupPlaceholder" runat="server" />
</LayoutTemplate>
<GroupTemplate>
<div>
<asp:PlaceHolder ID="itemPlaceholder" runat="server" />
</div>
</GroupTemplate>
<ItemTemplate>
<asp:Image ID="picAlbum" runat="server" ImageUrl='<%# "Handler.ashx?img_id=" + Eval("img_id") + "&" + "imagesize=T" %>' />
</ItemTemplate>
<EmptyItemTemplate>
</EmptyItemTemplate>
</asp:ListView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:dbaspnet
SelectCommand="SELECT [img_id], [img_title], [img_stream]
FROM [tbl_images] where img_is_primary = 0"></asp:SqlDataSource>
</center>
<%--<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False
DataSourceID="SqlDataSourc
<Columns>
<asp:BoundField DataField="img_id" HeaderText="img_id" InsertVisible="False" ReadOnly="True"
SortExpression="img_id" />
<asp:BoundField DataField="img_title" HeaderText="img_title" SortExpression="img_title"
<asp:TemplateField HeaderText="Image">
<ItemTemplate>
<asp:Image ID="Image1" runat="server" ImageUrl='<%# "~/Handler.ashx?img_id=" + Eval("img_id")%>'
Width="135" Height="145" border="0" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
every control has his a specific functionality
the truth is i never tried to simulate them using gridview, but i know that you can create your own custom controls and you can nest one in the other
i think the listview is more better for this purpose as gridview, because it has a customizable layout. [but this is my opinion]
Business Accounts
Answer for Membership
by: quicksilver17Posted on 2009-11-08 at 01:43:24ID: 25769952
Comparing ListView with GridView,DataList and Repeater : sghanem/ar chive/2008 /09/06/ com paring-lis tview-with -gridview- datalist-a nd-repeate r.aspx
http://weblogs.asp.net/ana