<asp:Repeater ID="ProductRelationNo" runat="server">
<ItemTemplate>
<a href="https://bbs.csdn.net/product_detail-<%#Eval("ProductID")%>.html"><img src="https://bbs.csdn.net/upimage/<%#Eval("PicPathSmall")%>" width="45" height="45" style="border:1px solid #cccccc;"></a>
</ItemTemplate>
</asp:Repeater>
舉例:
這個回圈顯示5張圖片,ProductID分別為1,2,3,4,5
現在想實作以下效果:
當前頁面ID是2的時候,這個圖片選中,邊框顏色變成紅色style="border:1px solid #ff0000;"
當前頁面ID是3的時候,這個圖片選中,邊框顏色變成紅色style="border:1px solid #ff0000;"
……
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/268619.html
標籤:ASP.NET
上一篇:go語言無法與C#匿名管道通信
