Repeater1_ItemDataBound绑定的问题,为什么数据会下移
前台代码:
<asp:Repeater ID= "Repeater1 " runat= "server " OnItemDataBound= "Repeater1_ItemDataBound " OnItemCreated= "Repeater1_ItemCreated ">
<ItemTemplate>
<tr >
<td height= "26 " align= "center " background= <%#imgpath %> >
<asp:HyperLink ID= "HyperLink5 " runat= "server " NavigateUrl= <%#DataBinder.Eval(Container.DataItem, "id ", "index.aspx?classid={0} ")%> CssClass=lfont20> <%# DataBinder.Eval(Container.DataItem, "classname ").ToString()%> </asp:HyperLink>
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
后台CS代码:
protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
classid = Request.QueryString[ "classid "];
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
HyperLink hp = new HyperLink();
hp = (HyperLink)e.Item.FindControl( "HyperLink5 ");
string quanbu = hp.NavigateUrl.ToString();
int xx = hp.NavigateUrl.ToString().Length - 19;
string panduan = qua