Let's make a new project from scratch. Go to File |
New |
Web Site...
; then, go to Solution Explorer
and click on Default.aspx
.
We can now see a basic HTML. Let's place a FileUpload
control into it. To do this, go to Toolbox
, grab a FileUpload
control, and drag and drop it below the line that begins with <form id=...
, and add a <br/>
tag to it, as follows:
<asp:FileUploadID ="FileUpload1" runat="server" /><br/>
Next, let's put in a button underneath this line, as follows:
<asp:Button ID="Button1" runat="server" Text="Upload" /><br />
Change the text on the button so that it says something more meaningful, such as Upload
.
Delete the two <div>
lines—you won't need them.
When you go to the Design
view, you have this simple interface, as shown in Figure 23.2.5. You have a Browse
button, which is part of the upload control, so that it doesn't have to be put in there separately, and an Upload
button:
Figure 23.2.5: The simple interface...