Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Configuration;
- using System.Data;
- using System.Linq;
- using System.Web;
- using System.Web.Security;
- using System.Web.UI;
- using System.Web.UI.HtmlControls;
- using System.Web.UI.WebControls;
- using System.Web.UI.WebControls.WebParts;
- using System.Xml.Linq;
- public partial class _Default : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
- {
- if (!Page.IsPostBack)
- {
- CollectionPager1.MaxPages = 30;
- CollectionPager1.PageSize = 10;
- CollectionPager1.DataSource = GetProducts().DefaultView;
- CollectionPager1.BindToControl = repeater1;
- repeater1.DataSource = CollectionPager1.DataSourcePaged;
- }
- }
- private DataTable GetProducts()
- {
- NorthwndDB db = new NorthwndDB();
- DataTable dtProducts = db.GetProducts().Tables[0];
- return dtProducts;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement