Click here to Skip to main content
15,941,071 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
hi all:
I wrote this peace of code:
XML
<asp:ListView ID="ListView1" runat="server" DataSourceID="SqlDataSource1" GroupItemCount="10">
                <AlternatingItemTemplate>
                    <td runat="server" style="background-color: #FAFAD2;color: #284775;">name:
                        <asp:Label ID="nameLabel" runat="server" Text='<%# Eval("name") %>' />
                        <br />photo:
                        <asp:Label ID="photoLabel" runat="server" Text='<%# Eval("photo") %>' />
                        <br />category:
                        <asp:Label ID="categoryLabel" runat="server" Text='<%# Eval("category") %>' />
                        <br />available_quantity:
                        <asp:Label ID="available_quantityLabel" runat="server" Text='<%# Eval("available_quantity") %>' />
                        <br /></td>
                </AlternatingItemTemplate>
                <EmptyDataTemplate>
                    <table runat="server" style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;border-style:none;border-width:1px;">
                        <tr>
                            <td>No data was returned.</td>
                        </tr>
                    </table>
                </EmptyDataTemplate>
                <EmptyItemTemplate>
<td runat="server" />
                </EmptyItemTemplate>
                <GroupTemplate>
                    <tr id="itemPlaceholderContainer" runat="server">
                        <td id="itemPlaceholder" runat="server"></td>
                    </tr>
                </GroupTemplate>
                <ItemTemplate>
                    <td runat="server" style="background-color: #FFFBD6;color: #333333;">name:
                        <asp:Label ID="nameLabel" runat="server" Text='<%# Eval("name") %>' />
                        <br />photo:
                        <asp:Label ID="photoLabel" runat="server" Text='<%# Eval("photo") %>' />
                        <br />category:
                        <asp:Label ID="categoryLabel" runat="server" Text='<%# Eval("category") %>' />
                        <br />available_quantity:
                        <asp:Label ID="available_quantityLabel" runat="server" Text='<%# Eval("available_quantity") %>' />
                        <br /></td>
                </ItemTemplate>
                <LayoutTemplate>
                    <table runat="server">
                        <tr runat="server">
                            <td runat="server">
                                <table id="groupPlaceholderContainer" runat="server" border="1" style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;border-style:none;border-width:1px;font-family: Verdana, Arial, Helvetica, sans-serif;">
                                    <tr id="groupPlaceholder" runat="server">
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr runat="server">
                            <td runat="server" style="text-align: center;background-color: #FFCC66;font-family: Verdana, Arial, Helvetica, sans-serif;color: #333333;"></td>
                        </tr>
                    </table>
                </LayoutTemplate>
            </asp:ListView>


i want to view image in this list view. the column photo contains the name of the image and the images are stored in a folder . i want to view these images in the list view.. any help will be appreciated. thx in advance :)
Posted

1 solution

 
Share this answer
 
Comments
ALNAJJARALI 27-Apr-13 16:02pm    
thx a lot, the third link was useful :)
_Amy 28-Apr-13 23:13pm    
Welcome. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900