views:

193

answers:

1

I'm writing an ASP.Net application which needs to display a large number of thumbnails, preferably in a paginated format. These thumbnails will be stored on the server's hard disk, but will have their filenames listed in a SQL Server database. What I want to do is to be able to filter the images being displayed based on criteria within the database.

I've looked at the NotesForGallery control, which I really like, but it doesn't seem to have a way to do that. --if I'm wrong, please correct me.

Are there any other image gallery type controls, preferably free, that can do what I need? I'm hoping someone can recommend a control or solution that will point me in the right direction.

Thanks in advance.

A: 

Like K2so was saying, have you looked at just databinding to a simple repeater or datagrid? Since your image names and other properties are in the database, you could run your query and spit back out a list of images.

Example (rough code, sorry)

<asp:repeater id="yourImages" runat="server">
    <itemTemplate>
        <img src='~/Images/Files/<% Bind("ImageFileName")%>' />
    </ItemTemplate>
</asp:repeater>

Using a paginated grid view would be very similar as well.

EDIT: I tried to post this as a comment, but the link wouldn't work very well. Here is a demo of asp.net listView with images in a grid and paged. Matt Berseth Demo Site

Tommy
Watch out for that /> unless your doctype is xhtml.
David Lively
That's a possibility. I'd like to be able to generate a 6x6 set of thumbnails. Maybe a grid view would be the best bet.
ks78
Are you on .NET 3.5? If so, check out this article by Matt Berseth (whatever happened to him anyways...?) - it shows a paged listView with images as part of the demo - i updated my answer with the link, SO does not like some of the chars in it I think...
Tommy
I ended up using the DataList control instead of a Repeater. According to Microsoft, its essentially the big brother of the Repeater. --So far, its working fairly well. I'm still having some issues with paging, but I think they I can solve them.
ks78
Thanks K2so.Thanks Tommy.
ks78