复制代码 代码如下:
OleDbConnection conn = new OleDbConnection();
conn.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("db.mdb");
OleDbDataAdapter da=new OleDbDataAdapter("select art_title,art_author from [article]",conn);
DataSet ds=new DataSet();
da.Fill(ds);
GridView1.DataSource=ds;
GridView1.DataBind();
复制代码 代码如下:
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
GridView1.PageIndex = e.NewPageIndex;
}
新闻热点
疑难解答
图片精选