lowerbound = (CurrentPage - 1) * 10;
upperbound = (CurrentPage * 10) -1;
我有一个上限和下限两个整数,它们指定必须访问列表中的元素的最低和最高元素
List<string> take = list.Take(upperbound).ToList();
如何从列表下限到上限选择项目?
foreach (string elemt in take)
{
HtmlGenericControl div = new HtmlGenericControl("div");
div.ID = "div" + elemt;
Label text = new Label();
text.Text = elemt;
div.Controls.Add(text);
divtest.Controls.Add(div);
}