等再跳转回来之后,再在if(!ispostback)里面把页码赋值给AspNetPager1.CurrentPageIndex
但是为什么,这个赋值之后还仍是1呢?
if (!IsPostBack)
{
if (Request.QueryString["CurrentPage"] != null)
{
currPage = Convert.ToInt32(Request.QueryString["CurrentPage"].ToString());
AspNetPager1.CurrentPageIndex = currPage;
}
else
{
currPage = AspNetPager1.CurrentPageIndex;
}问题:当前页里面显示的内容,和当前GridView的页数,在经过我点击跳转至其他页面之后,然后在由其他页面返回至本页面,本页面所显示的内容还是跳转的时候的内容,页码也是,都不发生改变的
但是为什么,这个赋值之后还仍是1呢?
if (!IsPostBack)
{
if (Request.QueryString["CurrentPage"] != null)
{
currPage = Convert.ToInt32(Request.QueryString["CurrentPage"].ToString());
AspNetPager1.CurrentPageIndex = currPage;
}
else
{
currPage = AspNetPager1.CurrentPageIndex;
}问题:当前页里面显示的内容,和当前GridView的页数,在经过我点击跳转至其他页面之后,然后在由其他页面返回至本页面,本页面所显示的内容还是跳转的时候的内容,页码也是,都不发生改变的
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货