Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: ASP
Posted by: Mario Lopes
Added: Sep 26, 2019 11:31 AM
Views: 5
Tags: files upload
  1.  <asp:FileUpload ID="FileUpload1" runat="server" AllowMultiple="true" />
  2.             <asp:Button ID="btnUpload" runat="server" Text="Upload" OnClick="Upload" />
  3.  
  4. código:
  5. foreach (HttpPostedFile postedFile in FileUpload1.PostedFiles)
  6.         {
  7.             string filename = Path.GetFileName(postedFile.FileName);
  8.             string filePath = Server.MapPath(filename);
  9.             Response.Write("Meu "+filePath);
  10.         }