Tampilan Desain:
Listing:
Protected Sub btnUpload_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnUpload.Click
Dim fileName As String
If FileUpload1.HasFile Then
Try
fileName = FileUpload1.FileName
FileUpload1.SaveAs(Server.MapPath("~/Storage/") + fileName)
lblStatus.Text = "sukses"
Catch ex As Exception
lblStatus.Text = "gagal"
End Try
End If
End Sub
No comments:
Post a Comment