成都网站建设设计

将想法与焦点和您一起共享

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://chengdu.cdxwcx.cn/article/ggodjp.html