asp.net repeater control for displaying images and associated names
I want to implement an image gallery in asp.net/C#. I am using sql server 2008, visual studio 2010 and .NET 4.0.
I have made a webpage and now want to display 6 images as thumbnails (and their names just below the thumbnails) at the center of the page. The format of the display is something like this:
img1 img2 img3
`<name1`> `<name2`> `<name3`>
img4 img5 img6
`<name4`> `<name5`> `<name6`>
1 2 3 4 Next>
Basic operation is like this:
I pull images from a database and then display them as above as thumbnails.
The 1 2 3 Next>
are links depending on whether there are more than 6 images pulled from th开发者_如何学Pythone DB. So basically the numbering 1 2 3 4 Next>
is dynamic depending on how many images exist.
Can anyone give me a basic overview of how this an be achieved? Should I be using a asp:Repeater or a asp:DataList for this kind of a display? Please let me know if additional details required. Thanks in advance for any suggestions/guidance/help.
I can suggest to see this examples
http://www.codeproject.com/KB/web-image/NickPhotoBrowser.aspx
http://www.codeproject.com/KB/applications/thumbtools.aspx
http://www.codeproject.com/KB/applications/NetPix.aspx
They have what you ask on source code and you can get ideas on how to do it.
精彩评论