xml文件读取后绑定到gridview
DataSet ds = new DataSet();
string filePath = FileUpload1.PostedFile.FileName.ToString();
try
{
if (filePath == " ")
{
Response.Write("");
}
else
{
ds.ReadXml(filePath);
gvPersonList.DataSource = ds.Tables[0];
gvPersonList.DataBind();
}
}
catch(Exception)
{
Response.Write("");
}
当前文章:xml文件读取后绑定到gridview
网站链接:http://pwwzsj.com/article/ggodjp.html