Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ' HTML form that allows file selection and submission
- <form action="upload.aspx" method="post" enctype="multipart/form-data">
- <input type="file" name="files" multiple>
- <input type="submit" value="Upload">
- </form>
- ' ASP.NET page that handles the file upload
- Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
- ' Check if the form was submitted
- If Request.HttpMethod = "POST" Then
- ' Process the uploaded files
- For Each file As String In Request.Files
- Dim postedFile As HttpPostedFile = Request.Files(file)
- ' Save the file to the server
- postedFile.SaveAs("C:\Uploads\" & postedFile.FileName)
- Next
- End If
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement