Before discussing the two approaches, add the following two
controls in your aspx page if these were not added earlier.
Listing 1: Add FileUpload Control
<asp:FileUpload ID="fileDocument" runat="server"></asp:FileUpload>
<asp:Button ID="btnUpload" runat="server" OnClick="btnUpload_Click"
Text="Upload"></asp:Button>