repeater 数据绑定问题
<asp:repeaterid="Repeater1"runat="server"onitemdatabound="Repeater1_ItemDataBound"><I...
<asp:repeater id="Repeater1" runat="server" onitemdatabound="Repeater1_ItemDataBound">
<ItemTemplate>
<div class="rpList">
<li style="border-width: thin; border-color: #000000; border-bottom-style: ridge;">
<table width="100%" style="table-layout: fixed;">
<tr width="100%" height="0px">
<td rowspan="2" width="6%" align="left" style="word-wrap: break-word; table-layout: fixed;">
<a href="SpotDetails.aspx?spot_Id=<%#Eval("Id")%>"><asp:Image ID="imgSpot" Width="100%" Height="90%" runat="server" ImageUrl='<%# Eval("LargePic") %>'/></a>
</td>
<td align="left" style="color: #000000">
<a href="SpotDetails.aspx?spot_Id=<%#Eval("Id")%>"><%#Eval("Name") %></a>
</td>
</tr>
<tr>
<td><asp:Image ID="imgStar" runat="server" /> (想在此处根据查询出来的<%#Eval("Level")%>决定显示那张图片,比如:<%#Eval("Level")%>=1 或者<%#Eval("Level")%>=2时,imgStar的ImageUrl显示某一张图片,<%#Eval("Level")%>=3时imgStar的ImageUrl显示另一张图片)</td>
</tr>
</table>
</li>
</div>
</ItemTemplate>
</asp:repeater>
请问如上效果怎么实现,请各位指点。 展开
<ItemTemplate>
<div class="rpList">
<li style="border-width: thin; border-color: #000000; border-bottom-style: ridge;">
<table width="100%" style="table-layout: fixed;">
<tr width="100%" height="0px">
<td rowspan="2" width="6%" align="left" style="word-wrap: break-word; table-layout: fixed;">
<a href="SpotDetails.aspx?spot_Id=<%#Eval("Id")%>"><asp:Image ID="imgSpot" Width="100%" Height="90%" runat="server" ImageUrl='<%# Eval("LargePic") %>'/></a>
</td>
<td align="left" style="color: #000000">
<a href="SpotDetails.aspx?spot_Id=<%#Eval("Id")%>"><%#Eval("Name") %></a>
</td>
</tr>
<tr>
<td><asp:Image ID="imgStar" runat="server" /> (想在此处根据查询出来的<%#Eval("Level")%>决定显示那张图片,比如:<%#Eval("Level")%>=1 或者<%#Eval("Level")%>=2时,imgStar的ImageUrl显示某一张图片,<%#Eval("Level")%>=3时imgStar的ImageUrl显示另一张图片)</td>
</tr>
</table>
</li>
</div>
</ItemTemplate>
</asp:repeater>
请问如上效果怎么实现,请各位指点。 展开
2个回答
Storm代理
2023-07-25 广告
2023-07-25 广告
StormProxies是一家可靠的代理服务提供商,提供原生IP(住宅原生IP)和高匿名代理服务。以下是关于StormProxies的原生IP服务的一些信息:1. 住宅原生IP:StormProxies提供的住宅原生IP是指从真实的家庭或企...
点击进入详情页
本回答由Storm代理提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询