Advertisement
Guest User

Default.aspx

a guest
Dec 8th, 2011
754
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.92 KB | None | 0 0
  1. using System;
  2. using System.Configuration;
  3. using System.Data;
  4. using System.Linq;
  5. using System.Web;
  6. using System.Web.Security;
  7. using System.Web.UI;
  8. using System.Web.UI.HtmlControls;
  9. using System.Web.UI.WebControls;
  10. using System.Web.UI.WebControls.WebParts;
  11. using System.Xml.Linq;
  12.  
  13. public partial class _Default : System.Web.UI.Page
  14. {
  15.     protected void Page_Load(object sender, EventArgs e)
  16.     {
  17.         if (!Page.IsPostBack)
  18.         {
  19.             CollectionPager1.MaxPages = 30;
  20.             CollectionPager1.PageSize = 10;
  21.             CollectionPager1.DataSource = GetProducts().DefaultView;
  22.             CollectionPager1.BindToControl = repeater1;
  23.             repeater1.DataSource = CollectionPager1.DataSourcePaged;
  24.         }
  25.     }
  26.  
  27.     private DataTable GetProducts()
  28.     {
  29.         NorthwndDB db = new NorthwndDB();
  30.         DataTable dtProducts = db.GetProducts().Tables[0];
  31.         return dtProducts;
  32.     }
  33. }
  34.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement