www.pudn.com > flash-zhibo-yuanma.rar > Default2.aspx.cs, change:2007-10-16,size:1211b


´╗┐using System; 
using System.Data; 
using System.Configuration; 
using System.Collections; 
using System.Web; 
using System.Web.Security; 
using System.Web.UI; 
using System.Web.UI.WebControls; 
using System.Web.UI.WebControls.WebParts; 
using System.Web.UI.HtmlControls; 
 
public partial class admin_Default2 : System.Web.UI.Page 
{ 
    protected void Page_Load(object sender, EventArgs e) 
    { 
 
        if (!IsPostBack) 
        { 
            binddr(); 
        } 
    } 
 
    string cid = ""; 
    void binddr() 
    { 
 
        //string sql = "select * from Sp_user "; 
 
        DataSet ds = Sp.SQLServerDAL.DbHelperSQL.Query("select * from Sp_user order by id desc"); 
 
        DataView dv = ds.Tables[0].DefaultView; 
        PagedDataSource pds = new PagedDataSource(); 
 
        AspNetPager1.RecordCount = dv.Count; 
        pds.DataSource = dv; 
        pds.AllowPaging = true; 
        pds.CurrentPageIndex = AspNetPager1.CurrentPageIndex - 1; 
        pds.PageSize = AspNetPager1.PageSize; 
 
        this.GridView1.DataSource = pds; 
        this.GridView1.DataBind(); 
    } 
    protected void AspNetPager1_PageChanged(object src, EventArgs e) 
    { 
        binddr(); 
    } 
 
}