Solved

Creating a CSV or XML file

Posted on 2008-06-25
4
334 Views
Last Modified: 2013-11-26
Hi,

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:

Name: [txtName]
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......

introlux
0
Comment
Question by:introlux
  • 2
4 Comments
 
LVL 8

Accepted Solution

by:
vsudip earned 250 total points
ID: 21863918
0
 
LVL 3

Assisted Solution

by:ofkr
ofkr earned 250 total points
ID: 21863938
0
 

Author Comment

by:introlux
ID: 21864057
I have looked at the examples and the 1st example and this is exporting from a datagrid and not from taking the values entered from user input (text boxes).

Second one, not sure how it works. Try to use code to compile but does not work.

Any working examples out there???
0
 

Author Comment

by:introlux
ID: 21874069
Any idiea guys?
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Normally the drop down box control found in the .Net framework tools is able to select just one data and value at a time, which is displayed on the text area.   But what if you want to have multiple values to be selected in the drop down box? As …
Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now