The subroutine getting called is:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'Call Upload()
Dim FileInput As HtmlInputFile
If FileInput.PostedFile Is "" Then
Label2.Text = "No File specified"
Else
Try
Dim ServerFileName As String
ServerFileName = Path.GetFileName(FileInput.PostedFile.FileName)
FileInput.PostedFile.SaveAs("C:\TestSaving\" & ServerFileName)
Label2.Text = "File " & ServerFileName & " uploaded successfully."
Catch ex As Exception
Label2.Text = ex.Message
End Try
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'Call Upload()
Dim FileInput As HtmlInputFile
If FileInput.PostedFile Is "" Then
Label2.Text = "No File specified"
Else
Try
Dim ServerFileName As String
ServerFileName = Path.GetFileName(FileInput.PostedFile.FileName)
FileInput.PostedFile.SaveAs("C:\TestSaving\" & ServerFileName)
Label2.Text = "File " & ServerFileName & " uploaded successfully."
Catch ex As Exception
Label2.Text = ex.Message
End Try
End If
End Sub