Online Product Info
CSVIncludeHeader Property

Overview
A CSV file is a way to collect data from your forms so that it can be conveyed as input to a table-oriented application. CSV files can also be opened with Microsoft Excel so that data is lined up in cells. CSV files can also be imported into most databases such as Microsoft Access and many more. 

Description
CSVIncludeHeader is set to True by default, and tells ASP.NET Auto DB to add the field names at the top of your CSV file when it is first created. If you do not want headers, you can set CSVIncludeHeader to false.

Please note that the directory that CSV files are written to must provide the ASPNET account with read/write/modify/delete rights.

Example of a CSV File Created by ASP.NET Auto DB
If you provide the name of a file that does not currently exist, ASP.NET Auto DB will create the CSV File. Notice the first line of the example CSV file in Listing A below (this is a header record that includes form field names, all rows under this one are the corresponding form values.)

Full_Name,Company,Website_Address,Email_Address,OptIn
John Doe,ACME Inc,http://www.acme.com,jdoe@acme.com,Yes
Jane Doe,WHAM Ltd,http://www.wham.com,jdoe@wham.com,Yes
Listing A

Usage
See Listing B for an example of the CSVAction property in the Auto DB control tag.

<cc1:AutoDB id="AutoDB1" runat="server" CSVAction="Store" CSVFileName="Data/NewsletterSubscriptions.csv" CSVIncludeHeader="True"> </cc1:AutoDB>
Listing B

Related Properties

CSVFileName, CSVAction, CSVDelimiter

 

© copyright 2004 360 IMPACT. All rights reserved.