This chapter describes knowledge about working with text files.
Working with text files
In the previous chapters, we have learned that Web page data is stored in a database.
You can also store site data in a text file.
The text file used to store the data is often referred to as a flat file. Common text file formats are. txt,. xml, and. csv (comma separated values).
In this chapter, you will learn to:
How to read and display data from a text file
Manually add a text file
In the following example, you will need a text file.
On your website, if you do not have a App_Data folder, create one. In the App_Data folder, create a file named Persons.txt.
Add the following to the file:
Persons.txt
George,lucassteven,spielbergalfred,hitchcock
"Recommended"
1. ASP. NET free Video Tutorials
2. Share the ASP. NET Learning Notes (1)--webpages Razor
3. Share the ASP. NET Learning Notes (2)--webpages Introduction
4. Share the ASP. NET Learning Notes (3) Webpages layout
5. Share the ASP. NET Learning Notes (4) folder
6. Share the ASP. NET Learning Notes (5) global page AppStart and Pagestart