Creating a CSV or XML file
Posted on 2008-06-25
I have an ASP.NET application, where I have to read some values from a DB and write the resultset to an CSV or XML File.
Reading the data from the DB is not problem. However, I'm not sure on how to create the CSV or XML File.
Can I please have some sample code (C#) on how to create the File, and write the values. Also, I need the file to be saved
Basically for example:
user goes on web site. Enters the following data:
Email Address: [txteaddress]
Once user has entered the following data, user clicks on the Submit button which actions the following tasks.
1. insert new data into access database file (which is ok, i have working)
2. send an e-mail of acknowledgement (which is ok, i have working)
3. create and enter question label and user data input in the text boxes into relevant cells in a .csv or .xml file (im having difficulty doing)
Thanks in advance......