C#-在DataPager中获取活动号码页面
作者:互联网
我在ListView控件中有LinkButton,我想通过单击LinkButton在DataPager中获得活动编号页面.
protected void addToCart_Click(object sender, CommandEventArgs e)
{
//get active number page
}
请帮我.
解决方法:
您可以在asp.net中执行以下操作
protected void ListView1_PagePropertiesChanging(object sender,PagePropertiesChangingEventArgs e)
{
int currPage = (e.StartRowIndex / e.MaximumRows)+1;
Response.Write(currPage.ToString());
}
标签:listview,webforms,asp-net,c,datapager 来源: https://codeday.me/bug/20191031/1972706.html