# Simple ASP.NET Gallery

**URL:** <https://forum.kirupa.com/t/simple-asp-net-gallery/222613>\
**Category:** programming\
**Created:** [April 15, 2007, 11:19am UTC](https://forum.kirupa.com/t/simple-asp-net-gallery/222613 "2007-04-15T11:19:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zakk](https://avatars.discourse-cdn.com/v4/letter/z/9fc348/32.png) [@Zakk](https://forum.kirupa.com/u/Zakk)\
**Post date:** [April 15, 2007, 11:19am UTC](https://forum.kirupa.com/t/simple-asp-net-gallery/222613/1 "2007-04-15T11:19:47Z")

</div>

I think this is a simple problem…but i really need help.

I have created a simple gallery to have on my personal portfolio.

I create my thumbnails manually in photoshop and save them in **/pics**.  
Also the big pictures are in this folder.

\*\* Here is my simple XML-file:\*\*

[COLOR=Red] \<?xml version=“1.0” encoding=“utf-8” ?\>

\<images\>

\<image url=“pics/testpic\_thumb.jpg” link=“pics/testpic\_big.jpg”\>\</image\>  
\<image url=“pics/testpic[/COLOR][COLOR=Red]\_thumb[/COLOR][COLOR=Red].jpg” link=“pics/testpic\_big.jpg”\>\</image\>  
\<image url=“pics/testpic[/COLOR][COLOR=Red]\_thumb[/COLOR][COLOR=Red].jpg” link=“pics/testpic\_big.jpg”\>\</image\>  
\<image url=“pics/testpic[/COLOR][COLOR=Red]\_thumb[/COLOR][COLOR=Red].jpg” link=“pics/testpic\_big.jpg”\>\</image\>

\</images\>[/COLOR]

\*\* And this is how I list them on the .aspx-page:\*\*

[COLOR=Navy]\<asp:Repeater ID=“Repeater1” runat=“server” DataSourceID=“XmlDataSource1”\>  
\<ItemTemplate\>

```
        &lt;a href="&lt;%# DataBinder.Eval(Container.DataItem,"link") %&gt;" rel="lightbox"&gt;
 &lt;img src="&lt;%# DataBinder.Eval(Container.DataItem,"url") %&gt;" alt=""/&gt;

```

\</a\>

```
    &lt;/ItemTemplate&gt;
&lt;/asp:Repeater&gt;

&lt;asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="~/gallery.xml"&gt;

```

\</asp:XmlDataSource\>[/COLOR]

In the querystring I have it something like this: **Gallery.aspx?ID=3**.  
Now let’s say i want to show a different set of thumbs depending on the ID-number.

How do I change the XML-file and Repeater-code to select different pics from the XML?

I also want the code to see if there are any pics at all to the current gallery-ID, and choose to display a gallery or not.

\*\* Thank you.\*\*
