private
void
Button2_Click(
object
sender, System.EventArgs e)
... {
DataSet ds=new DataSet();
ds.ReadXml(Server.MapPath("people.xml"));
this.DataGrid1.DataSource=ds;
this.DataGrid1.DataBind();
}
private void Button1_Click( object sender, System.EventArgs e)
... {
SqlConnection conn=new SqlConnection("server=.;uid=sa;pwd=123;database=pb");
conn.Open();
string sql="select * from layer";
SqlDataAdapter da=new SqlDataAdapter(sql,conn);
DataSet ds=new DataSet();
da.Fill(ds,"aa");
ds.WriteXml(Server.MapPath("mytest1.xml"));
Response.Write("<script>alert('成功')</script>");
}
... {
DataSet ds=new DataSet();
ds.ReadXml(Server.MapPath("people.xml"));
this.DataGrid1.DataSource=ds;
this.DataGrid1.DataBind();
}
private void Button1_Click( object sender, System.EventArgs e)
... {
SqlConnection conn=new SqlConnection("server=.;uid=sa;pwd=123;database=pb");
conn.Open();
string sql="select * from layer";
SqlDataAdapter da=new SqlDataAdapter(sql,conn);
DataSet ds=new DataSet();
da.Fill(ds,"aa");
ds.WriteXml(Server.MapPath("mytest1.xml"));
Response.Write("<script>alert('成功')</script>");
}