Adding and Displaying Data Easily via ASP and XML/XSL (Page 1 of 3 )
Storing and displaying data is a common and essential task, if you are working with Applications. It doesn't matter whether you are working with desktop Applications or WebApplications. The saving and displaying process is nearly always required. In this article I will show you how you can easily use an ASP form to add data into a XML file and how you can retrieve this data to display it in a well formed table.
We will create an example ASP page, in which the user will be able to enter his Name, Age, Gender and a Postalcode. This data will be stored in a XML file. To display the data we will use XSL. The example ASP page and the resulting table look like this:
Its has always been important for me to divide the ASP Page in two parts and I would suggest you to do the same. Some people are mixing the asp and html code, but I would not recommend it to you. But sometimes it isn`t possible to spilt the ASP Page in two parts, in this case you will need to find your own and best suitable way. But anyway, try it! Here an image of the structure how my ASP page always looks like:
The first part contains a simple Form, and the second part contains the ASP Code which will do the saving for us. For a better understanding we will start with the Form.