protected void dlBbsDetail_ItemDataBound(object sender, DataListItemEventArgs e)
{
ListItemType elemType = e.Item.ItemType;
if (elemType != ListItemType.Header && elemType != ListItemType.Footer && elemType != ListItemType.Pager)
{
int code = e.Item.ItemIndex + 1;
int pageIndex = Convert.ToInt32(hfPageIndex.Value);
if (pageIndex > 1)
{
code = (pageIndex - 1) * AspNetPager1.PageSize + code;
}
Label lblC = e.Item.FindControl("lblCode") as Label;
lblC.Text = code + " 楼";
}
}
DataList排序编号
最新推荐文章于 2021-05-12 15:42:16 发布