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>
<a href="<%# DataBinder.Eval(Container.DataItem,"link") %>" rel="lightbox">
<img src="<%# DataBinder.Eval(Container.DataItem,"url") %>" alt=""/>
</a>
</ItemTemplate>
</asp:Repeater>
<asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="~/gallery.xml">
</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.**