Online Product Info
CSVFileName 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
The CSVFileName is optional and can include a full or relative path to the CSV file. So both all lf the following CSVFileNames would be valid:

CSVFileName=”” (Same as not specifying this property, and would create a random named CSV File)

CSVFileName=”MyData.csv” (Would create the csv file in the same directory as your form)

CSVFileName=”/data/MyData.csv” (Would create the csv file in your data directory)

CSVFileName=”C:\somedir\data\MyData.csv” (Would create the csv file in the physical path you specify)

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. If the file already exists, the Auto DB control will append the file with each form submission. An example CSV file created by the Auto DB control is shown in Listing A.

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 XMLFileName property in the Auto DB control tag.

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

Related Properties

CSVAction, CSVDelimiter, CSVIncludeHeader

 

© copyright 2004 360 IMPACT. All rights reserved.