如何在Repeater里操作Container.ItemIndex

<%# Container.ItemIndex==3 ? "<div> hello33333 </div>" : string.Empty %>
<%# Container.ItemIndex==6 ? "<div> hello666666 </div>" : string.Empty %>


<asp:Repeater ID="repList" runat="server">
                    <ItemTemplate>
                    	
                        <dl <%# Container.ItemIndex==0?"id=a":"class=bg id=a" %><%# Container.ItemIndex + 1%> onmouseover=show_king_list(this,<%# Container.ItemIndex + 1%>);>
                        
                            <dt class="sl01"><%# Container.ItemIndex + 1%></dt>
                            <dt class="sl02"><asp:HyperLink Runat=server NavigateUrl='<%# "~/Product/ProductInfo.aspx?ID=" + Eval( "productid") %>' ToolTip='<%# Eval( "productname")%>' ID="Hyperlink2" Target="_blank"><img src="<%# GetMinPic((string)Eval( "picture1"))%>" width="50" height="50"></asp:HyperLink></dt>
                            <dd class="sl03"><asp:HyperLink runat="server" NavigateUrl='<%# "~/Product/ProductInfo.aspx?ID=" + Eval( "productid")+"&CategoryID="+Eval( "categoryid") %>' ToolTip='<%# Eval( "productname")%>' ID="Hyperlink1" Target="_blank"><%# GetTitle( (string) Eval( "productname") )%></asp:HyperLink></dd>
                            <dd class="sl04"><%# Eval( "changedate","{0:yyyy-MM-dd}")%></dd>
                            <dd class="sl05"><%# GetDesc( (string) Eval( "productdesc"))%></dd>
                        </dl>
                    </ItemTemplate>
                </asp:Repeater>


你可能感兴趣的:(C++,c,C#)