Saturday, 15 September 2012

Read xml data to dataset


 if (File.Exists(HttpContext.Current.Server.MapPath("~/UploadFile/" + Session["Name"].ToString()) + ".xml"))
        {
            DataSet ds = new DataSet();
            ds.ReadXml(HttpContext.Current.Server.MapPath("~/UploadFile/" + Session["Name"].ToString()) + ".xml");
            GridView1.DataSource = ds.Tables[0];
            GridView1.DataBind();
        }

No comments:

Post a Comment