views:

30

answers:

1

yo, i have repeater

            <asp:Repeater ID="Repeater1" runat="server" DataSource='<%# Bind("Photos") %>' OnItemCreated="Repeater1_itemCreated" >
                <ItemTemplate>
                    <div class="thumbs">
                        <a href='Images/Parts/Photos/<%# Eval("PhotoId") %>.jpg' rel="lightbox-parts">
                        <img id="smallPhotoImg" alt="" width="70px" height="70px" src='Images/Parts/Thumbs/<%# Eval("PhotoId") %>.jpg' />
                        </a>&nbsp;&nbsp;
                    </div>
                </ItemTemplate>

            </asp:Repeater>

it displays all images for needed "Part" but what i need is to hide the image i.e repeater item if Photos.IsDefault == true;

Thx 4 help.

A: 

Yes, the purpose was to hide the img, the Photos.isDeFault is db field, heres mine solution

Photo photo = (Photo)e.Item.DataItem;

if (photo != null)
    if (photo.IsDefault)
        e.Item.Visible = false;

Thx for attention.

qwebek