1个回答
展开全部
<asp:Repeater ID="Repeater1" runat="server">
<HeaderTemplate>
<table>
</HeaderTemplate>
<ItemTemplate>
<asp:PlaceHolder ID="PlaceHolder1" runat="server" Visible='<%# (Container.ItemIndex + 1) % 3 ==1 %>'>
<tr>
</asp:PlaceHolder>
<td>
<table>
<tr>
<td align="center">
<a href="showproducstinfo.aspx?id=<%#Eval("p_id") %>">
<asp:Image ID="Image1" runat="server" ImageUrl='<%#Eval("p_url","../productimages/{0}") %>' />
</a>
</td>
</tr>
<tr>
<td align="center">
<asp:Label ID="Label1" runat="server" Text='<%#Eval("p_name") %>'></asp:Label>
</td>
</tr>
</table>
</td>
<asp:PlaceHolder ID="PlaceHolder2" runat="server" Visible='<%# (Container.ItemIndex + 1) % 3 ==0 %>'>
</tr> </asp:PlaceHolder>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
<HeaderTemplate>
<table>
</HeaderTemplate>
<ItemTemplate>
<asp:PlaceHolder ID="PlaceHolder1" runat="server" Visible='<%# (Container.ItemIndex + 1) % 3 ==1 %>'>
<tr>
</asp:PlaceHolder>
<td>
<table>
<tr>
<td align="center">
<a href="showproducstinfo.aspx?id=<%#Eval("p_id") %>">
<asp:Image ID="Image1" runat="server" ImageUrl='<%#Eval("p_url","../productimages/{0}") %>' />
</a>
</td>
</tr>
<tr>
<td align="center">
<asp:Label ID="Label1" runat="server" Text='<%#Eval("p_name") %>'></asp:Label>
</td>
</tr>
</table>
</td>
<asp:PlaceHolder ID="PlaceHolder2" runat="server" Visible='<%# (Container.ItemIndex + 1) % 3 ==0 %>'>
</tr> </asp:PlaceHolder>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
更多追问追答
追问
但是如果像这样的。判断:如果name==123 则跳转到一个页面。如果name==555,则跳转到另个页面。。这个的怎么写啊? 拜托帮帮忙
追答
什么意思???name跳转?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询