3
You’d have to do a loop loop in this case?
PaperBLL paperBLL = new PaperBLL();
List<PaperEO> papers = paperBLL.SelectPapers();
HyperLink1.ImageUrl = "~/App_Themes/MultiMercadoLibertyExclusiva/Capas/" + papers.First(x => x.id == 1).capa;
HyperLink2.ImageUrl = "~/App_Themes/MultiMercadoLibertyExclusiva/Capas/" + papers.First(x => x.id == 2).capa;
HyperLink3.ImageUrl = "~/App_Themes/MultiMercadoLibertyExclusiva/Capas/" + papers.First(x => x.id == 3).capa;
HyperLink4.ImageUrl = "~/App_Themes/MultiMercadoLibertyExclusiva/Capas/" + papers.First(x => x.id == 4).capa;
HyperLink5.ImageUrl = "~/App_Themes/MultiMercadoLibertyExclusiva/Capas/" + papers.First(x => x.id == 5).capa;
HyperLink6.ImageUrl = "~/App_Themes/MultiMercadoLibertyExclusiva/Capas/" + papers.First(x => x.id == 6).capa;
HyperLink7.ImageUrl = "~/App_Themes/MultiMercadoLibertyExclusiva/Capas/" + papers.First(x => x.id == 7).capa;
HyperLink8.ImageUrl = "~/App_Themes/MultiMercadoLibertyExclusiva/Capas/" + papers.First(x => x.id == 8).capa;
HyperLink9.ImageUrl = "~/App_Themes/MultiMercadoLibertyExclusiva/Capas/" + papers.First(x => x.id == 9).capa;
HyperLink10.ImageUrl = "~/App_Themes/MultiMercadoLibertyExclusiva/Capas/" + papers.First(x => x.id == 10).capa;
HyperLink11.ImageUrl = "~/App_Themes/MultiMercadoLibertyExclusiva/Capas/" + papers.First(x => x.id == 11).capa;
HyperLink12.ImageUrl = "~/App_Themes/MultiMercadoLibertyExclusiva/Capas/" + papers.First(x => x.id == 12).capa;
(...)
<ul>
<li><asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/App_Themes/MultiMercadoLibertyExclusiva/Capas/01.png" rel="Shadowbox[Vocation]"><asp:Image ID="Image2" runat="server" Width="131" ImageUrl="~/App_Themes/MultiMercadoLibertyExclusiva/Capas/01.png" /></asp:HyperLink></li>
<li><asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl="~/App_Themes/MultiMercadoLibertyExclusiva/Capas/02.png" rel="Shadowbox[Vocation]"><asp:Image ID="Image3" runat="server" Width="131" ImageUrl="~/App_Themes/MultiMercadoLibertyExclusiva/Capas/02.png" /></asp:HyperLink></li>
<li><asp:HyperLink ID="HyperLink3" runat="server" NavigateUrl="~/App_Themes/MultiMercadoLibertyExclusiva/Capas/03.png" rel="Shadowbox[Vocation]"><asp:Image ID="Image4" runat="server" Width="131" ImageUrl="~/App_Themes/MultiMercadoLibertyExclusiva/Capas/03.png" /></asp:HyperLink></li>
<li><asp:HyperLink ID="HyperLink4" runat="server" NavigateUrl="~/App_Themes/MultiMercadoLibertyExclusiva/Capas/04.png" rel="Shadowbox[Vocation]"><asp:Image ID="Image5" runat="server" Width="131" ImageUrl="~/App_Themes/MultiMercadoLibertyExclusiva/Capas/04.png" /></asp:HyperLink></li>
<li><asp:HyperLink ID="HyperLink5" runat="server" NavigateUrl="~/App_Themes/MultiMercadoLibertyExclusiva/Capas/05.png" rel="Shadowbox[Vocation]"><asp:Image ID="Image6" runat="server" Width="131" ImageUrl="~/App_Themes/MultiMercadoLibertyExclusiva/Capas/05.png" /></asp:HyperLink></li>
<li><asp:HyperLink ID="HyperLink6" runat="server" NavigateUrl="~/App_Themes/MultiMercadoLibertyExclusiva/Capas/06.png" rel="Shadowbox[Vocation]"><asp:Image ID="Image7" runat="server" Width="131" ImageUrl="~/App_Themes/MultiMercadoLibertyExclusiva/Capas/06.png" /></asp:HyperLink></li>
<li><asp:HyperLink ID="HyperLink7" runat="server" NavigateUrl="~/App_Themes/MultiMercadoLibertyExclusiva/Capas/07.png" rel="Shadowbox[Vocation]"><asp:Image ID="Image8" runat="server" Width="131" ImageUrl="~/App_Themes/MultiMercadoLibertyExclusiva/Capas/07.png" /></asp:HyperLink></li>
<li><asp:HyperLink ID="HyperLink8" runat="server" NavigateUrl="~/App_Themes/MultiMercadoLibertyExclusiva/Capas/08.png" rel="Shadowbox[Vocation]"><asp:Image ID="Image9" runat="server" Width="131" ImageUrl="~/App_Themes/MultiMercadoLibertyExclusiva/Capas/08.png" /></asp:HyperLink></li>
<li><asp:HyperLink ID="HyperLink9" runat="server" NavigateUrl="~/App_Themes/MultiMercadoLibertyExclusiva/Capas/09.png" rel="Shadowbox[Vocation]"><asp:Image ID="Image10" runat="server" Width="131" ImageUrl="~/App_Themes/MultiMercadoLibertyExclusiva/Capas/09.png" /></asp:HyperLink></li>
<li><asp:HyperLink ID="HyperLink10" runat="server" NavigateUrl="~/App_Themes/MultiMercadoLibertyExclusiva/Capas/10.png" rel="Shadowbox[Vocation]"><asp:Image ID="Image11" runat="server" Width="131" ImageUrl="~/App_Themes/MultiMercadoLibertyExclusiva/Capas/10.png" /></asp:HyperLink></li>
</ul>
This is in a Code Behind?
– Leonel Sanches da Silva
I forgot to mention, yes you are!
– Diego Zanardo
Of curiosity, it would not fit something of the type
HyperLink[12].ImageUrl
in your solution?– Bacco
@Bacco, I don’t know this "technique", I can do this?
– Diego Zanardo
@Diegozanardo this is just my question :) Maybe I can, but the lambda may not work as expected.
– Bacco
@Diegozanardo saw that you have already achieved the solution. Solved everything? Solved this part too
papers.First(x => x.id == 12).capa
? Or you don’t need it anymore?– Maniero