求教用户控件DropDownList实现分页跳转?
我页面上有<asp:DropDownListID="DropDownList1"runat="server"Width="100px"></asp:DropDownLis...
我页面上有<asp:DropDownList ID="DropDownList1" runat="server" Width="100px">
</asp:DropDownList> , public void BangDingDDL()
{
DataSet ds = tbll.GetAllList(); //加载所有页数
DropDownList1.DataSource = ds;
int pageall = int.Parse(ViewState["PageCount"].ToString()) - 1;
this.DropDownList1.Items.Clear();
for (int i = 1; i <= pageall; i++)
{
ListItem myli = new ListItem(i.ToString(), i.ToString());
myli.Enabled = true;
this.DropDownList1.Items.Add(myli);
}
this.DropDownList1.Enabled = true;
this.DropDownList1.AutoPostBack = true;
}
不知道怎么获得最大的页数? 谢谢,请指教!分数不高。 展开
</asp:DropDownList> , public void BangDingDDL()
{
DataSet ds = tbll.GetAllList(); //加载所有页数
DropDownList1.DataSource = ds;
int pageall = int.Parse(ViewState["PageCount"].ToString()) - 1;
this.DropDownList1.Items.Clear();
for (int i = 1; i <= pageall; i++)
{
ListItem myli = new ListItem(i.ToString(), i.ToString());
myli.Enabled = true;
this.DropDownList1.Items.Add(myli);
}
this.DropDownList1.Enabled = true;
this.DropDownList1.AutoPostBack = true;
}
不知道怎么获得最大的页数? 谢谢,请指教!分数不高。 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询