- protected void Page_Load(object sender, EventArgs e)
- {
- DataSet ds = new DataSet();
- ds.ReadXml(MapPath("prod.xml"));
- DataGrid grid1 = new DataGrid();
- grid1.DataSource = ds;
- grid1.DataBind();
- }
- <?xml version="1.0" encoding="utf-8" ?>
- <Productlist>
- <Products>
- <ProductID>1</ProductID>
- <Name>pro1</Name>
- </Products>
- <Products>
- <ProductID>2</ProductID>
- <Name>pro22</Name>
- </Products>
- </Productlist>
- <asp:GridView ID="grid1" runat="server">
- </asp:GridView>

