Solved

Creating a CSV or XML file

Posted on 2008-06-25
4
337 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 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

756 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