Thursday, December 1, 2011

ASP.net File upload

 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:

^_^

SEMOGA BERMANFAAT