Guest User

Untitled

a guest
Jun 21st, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. <html>
  2. <head>
  3.  
  4. <script language="VB" runat="server">
  5.  
  6. Sub Button1_Click(sender As Object, e As EventArgs)
  7.  
  8. if FileUpLoad1.HasFile
  9. 'Uncomment this line to Save the uploaded file
  10. FileUpLoad1.SaveAs("C:\Development\sites\eXpressCourse3\" & FileUpLoad1.Filename)
  11. Label1.Text = "Received " & FileUpLoad1.FileName & " Content Type " & FileUpLoad1.PostedFile.ContentType & " Length " & FileUpLoad1.PostedFile.ContentLength
  12. else
  13. Label1.Text = "No uploaded file"
  14. end if
  15.  
  16. end sub
  17.  
  18. </script>
  19.  
  20. </head>
  21. <body>
  22.  
  23. <h3><font face="Verdana">File Upload</font></h3>
  24.  
  25. <form runat=server>
  26.  
  27. <asp:FileUpLoad id="FileUpLoad1" AlternateText="You cannot upload files" runat="server" />
  28. <asp:Button id="Button1" Text="Upload" OnClick="Button1_Click" runat="server" />
  29. <asp:Label id="Label1" runat="server" />
  30. </form>
  31.  
  32. </body>
  33. </html>
Add Comment
Please, Sign In to add comment