?
Solved

Creating a CSV or XML file

Posted on 2008-06-25
4
Medium Priority
?
340 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 8

Accepted Solution

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

Assisted Solution

by:ofkr
ofkr earned 750 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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)…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

762 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