This is a continuation of the partially resolved issue posted here: ASP:Repeater and embedded radiobuttons
I'm now trying to format the display of my photos so that they still run horizontally, but the radiobutton appears directly beneath each photo. By default, they appear to the right of the photo when using my current code:
<asp:Repeater ID="repPhotos" runat="server">
<ItemTemplate>
<asp:hyperlink id="link" NavigateUrl='<%# Container.DataItem %>' runat="server">
<asp:Image ID="Image" runat="server" ImageUrl='<%# Container.DataItem %>' Height="10%" Width="10%" />
</asp:hyperlink>
<asp:RadioButton runat="server" ID="rbPhoto" CssClass="myRadioButton" onclick="radioButtonClick(this)" />
</ItemTemplate>
</asp:Repeater>
It was later suggested that I wrap my RadioButton control with <p>
tags as follows:
<asp:Repeater ID="repPhotos" runat="server">
<ItemTemplate>
<asp:hyperlink id="link" NavigateUrl='<%# Container.DataItem %>' runat="server">
<asp:Image ID="Image" runat="server" ImageUrl='<%# Container.DataItem %>' Height="10%" Width="10%" />
</asp:hyperlink>
<p>
<asp:RadioButton runat="server" ID="rbPhoto" CssClass="myRadioButton" onclick="radioButtonClick(this)" />
</p>
</ItemTemplate>
</asp:Repeater>
But this just made all of the photos display vertically. Here's what the before and after output look like...