How to create a File Upload in ASP.NET

ASP.NET FileUpload control provides functionality to browse a file and upload on a Web server. FileName property is the name of the file to be uploaded. FileContent property gets a Stream object of that file.
 
The following code snippet creates a FileUpload control in ASP.NET.
  1. <asp:FileUpload  
  2.     AccessKey="string"  
  3.     BackColor="color name|#dddddd"  
  4.     BorderColor="color name|#dddddd"  
  5.     BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double|Groove|Ridge|  
  6.         Inset|Outset"  
  7.     BorderWidth="size"  
  8.     CssClass="string"  
  9.     Enabled="True|False"  
  10.     EnableTheming="True|False"  
  11.     EnableViewState="True|False"  
  12.     Font-Bold="True|False"  
  13.     Font-Italic="True|False"  
  14.     Font-Names="string"  
  15.     Font-Overline="True|False"  
  16.     Font-Size="string|Smaller|Larger|XX-Small|X-Small|Small|Medium|  
  17.         Large|X-Large|XX-Large"  
  18.     Font-Strikeout="True|False"  
  19.     Font-Underline="True|False"  
  20.     ForeColor="color name|#dddddd"  
  21.     Height="size"  
  22.     ID="string"  
  23.     OnDataBinding="DataBinding event handler"  
  24.     OnDisposed="Disposed event handler"  
  25.     OnInit="Init event handler"  
  26.     OnLoad="Load event handler"  
  27.     OnPreRender="PreRender event handler"  
  28.     OnUnload="Unload event handler"  
  29.     runat="server"  
  30.     SkinID="string"  
  31.     Style="string"  
  32.     TabIndex="integer"  
  33.     ToolTip="string"  
  34.     Visible="True|False"  
  35.     Width="size"  
  36. />