question regarding displaying xml data in a gridview(asp.net). Im struggling to get it to display all data as each time i go to run it says a error with binding data. protected void Data() { var ds =...


 question regarding displaying xml data in a gridview(asp.net). Im struggling to get it to display all data as each time i go to run it says a error with binding data.


protected void Data() { var ds = new DataSet(); var path = Server.MapPath("~/XMLFile1.xml"); ds.ReadXml(path); GridView1.DataSource = ds; GridView1.DataBind(); }


This is my code and here is the xml:



1 Anna Acacia [email protected] Lilly Pilly 100 1 2 Byron Beech [email protected] Snow Gum 17 2 3 Cassie Casuarina [email protected] Golden Wattle 45 3 4 Donny Dahlia [email protected] Rusty Gum 8 44


Please any help is welcome as been stuck on it for a while.

Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here