Example #1
0
        void BindList()
        {
            Int32           id      = Int32.Parse(Request.QueryString["maDanhMuc"].ToString());
            PagedDataSource objPage = new PagedDataSource();

            try
            {
                objPage.DataSource       = aBUS.ShowSP(id).DefaultView;
                objPage.AllowPaging      = true;
                objPage.PageSize         = 16;
                objPage.CurrentPageIndex = CurrentPage;
                btnSau.Enabled           = !objPage.IsLastPage;
                btnTruoc.Enabled         = !objPage.IsFirstPage;
                DataList1.DataSource     = objPage;
                DataList1.DataBind();
                // TotalRecord = dts.Tables[0].Rows.Count;
            }
            catch (Exception)
            {
            }
            finally
            {
                objPage = null;
            }
        }