Here I will explain how to insert data into XML and how to retrieve data from XML and how to bind data to DataList using asp.net.

Description:

XML means Extensible markup language why we need to use this one because by using XML we can store the data and we can easily retrieve and display the data without using database in our applications.if we need to display dynamic data in our application it will take time to conenct database and retrive data from database but if use XML to store data we can do operations with xml file directly without using database. If we store data in database that is incompatible to some of the computer applications but if we store data in XML format it will support for all applications. It is independent for all software applications and it is accessible with all applications.

Now I will explain inserting data into xml and retrive data from XML and bind data to datalist with simple example.

After that add XML file to your application and give name as "Sample.xml" intially xml file like thisroot element is compulsary for XML files that’s why I added CommentInformation in XML file that root element in XML file.

Hello suresh garu, I got this problem when i am click on submit button don't display data in datalist. in 2nd execution the previous data will display but not current data when click the submit button, what can i do? give me solution.