Beispiel #1
0
 public void ListBind()
 {
     Data1.DataSource = CreateSource();
     Data1.DataBind();
     lbnNextPage.Enabled = true;
     lbnPrevPage.Enabled = true;
     if (CurrentPage == (PageCount - 1))
     {
         lbnNextPage.Enabled = false;
     }
     if (CurrentPage == 0)
     {
         lbnPrevPage.Enabled = false;
     }
     lblCurrentPage.Text = (CurrentPage + 1).ToString();
 }
Beispiel #2
0
 public void ListBind()
 {
     if (Session["userName"] == null)
     {
         Response.Write("<script>alert('请先进行登录')</script>");
         Response.Redirect("Login.aspx");
     }
     Data1.DataSource = CreateSource();
     Data1.DataBind();
     lbnNextPage.Enabled = true;
     lbnPrevPage.Enabled = true;
     if (CurrentPage == (PageCount - 1))
     {
         lbnNextPage.Enabled = false;
     }
     if (CurrentPage == 0)
     {
         lbnPrevPage.Enabled = false;
     }
     lblCurrentPage.Text = (CurrentPage + 1).ToString();
 }