我的Page_Load就这么两句啊!
只有两句??
public void Page_Load()
{
SqlConnection sqlcon=new SqlConnection("连接的字符串");
SqlDataAdapter sqldar=new SqlDataAdapter ("sql语句",sqlcon);
DataSet ds = new DataSet();
sqldar.File(ds,"表名");
this.DataGrid1.DataSource=ds.Tables["表名"].DefaultView;
this.DataGrid1.DataBind();
}