Hi,
I currently have a table with three columns: inscription-no , photo-no , photo-url.
An example of the table would be
inscription-no photo-no photo-url
8376677 1 /photos/123453.jpg
8376677 2 /photos/dfsdfg.jpg
8376677 3 /photos/w2w3ed.jpg
8376677 4 /photos/2g2r2s.jpg
2345679 1 /photos/3d43f4.jpg
2345679 2 /photos/6h3hdj.jpg
2345679 3 /photos/dfgdsw.jpg
now I want a page that is able to retrieve all the photos for a certain inscription-no, this inscription-no is a query string. I am able to only retrieve the first photo, but never the rest. Also note that the number of photos is never the same (i.e. inscription 8376677 has 4 photos, but 2345679 has 3, etc.)
My code looks like this:
<form id="form1" runat="server">
<div>
</div>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>"
SelectCommand="SELECT * FROM [PHOTOS] WHERE ([NO_INSCRIPTION] = ?)">
<SelectParameters>
<asp:QueryStringParameter Name="NO_INSCRIPTION" QueryStringField="id"
Type="String" />
</SelectParameters>
</asp:SqlDataSource>
<asp:DetailsView ID="DetailsView1" runat="server" Height="50px" Width="125px"
AutoGenerateRows="False" DataKeyNames="NO_INSCRIPTION,SEQ"
DataSourceID="SqlDataSource1">
<Fields>
<asp:BoundField DataField="NO_INSCRIPTION" HeaderText="Inscription Number"
ReadOnly="True" SortExpression="NO_INSCRIPTION" />
<asp:BoundField DataField="PHOTO_NO" HeaderText="Photo Number" ReadOnly="True"
SortExpression="PHOTO_NO" />
<asp:BoundField DataField="PhotoURL" HeaderText="Photo URL"
SortExpression="PhotoURL" />
<asp:ImageField DataImageUrlField="PhotoUrl"
HeaderText="Photo">
</asp:ImageField>
</Fields>
</asp:DetailsView>
</form>
Thanks for the help.
- Antonio