In this chapter, you will learn how to use the Upload feature in ASP.NET. To do this, we will create an interface with the following controls on the page:
Figure 23.2.1: The controls for our user interface
When you click on the Browse button, you should get some sample files, as shown in Figure 23.2.2. Select one of these files, for example, samp.txt:
Figure 23.2.2: The C:\data directory file listing
Now, when you click on the Upload button, and once the file is uploaded, browser will display a message like the one shown in Figure 23.2.3, displaying where the files have been uploaded, how many files are inside the directory, and what they are named. This is our objective here:
Figure 23.2.3: Message displayed when the Upload button is clicked
Make sure that you have data as a folder in the root directory of your hard drive,...