- Create a Page with the Name XMLSample.aspx
- Write the Below controls in the .aspx source Page.
- Create an xml file on the desktop with Name Students ( See example xml at the End)
</asp:GridView>
Path:
<asp:FileUpload ID="FileUpload1" runat="server" />
<asp:Button ID="btnAdd" runat="server" Text="Add" onclick="btnAdd_Click" />
- Write the Below code in the Code behind file
<Students>
<Student>
<id>1312</id>
<name>123</name>
<age>123123</age>
</Student>
<Student>
<id>6</id>
<name>Ashoke</name>
<age>23</age>
</Student>
</Students>