Protected Sub uploadbutton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles uploadbutton.Click If FileUpload1.HasFile Then Try Dim filename As String = Path.GetFileName(FileUpload1.FileName) FileUpload1.SaveAs(HttpContext.Current.Server.MapPath("C:\FileDestination") & filename) statuslabel.Text = "Upload status: File uploaded!" Catch ex As Exception statuslabel.Text = "Upload status: The file could not be uploaded. The following error occured: " + ex.Message End Try End If End Sub End Class
|Why is some text in blue in Visual Studio?||6||25|
|I need help adding a datacontext value to a listbox with images in it. This is a WPF application with VB.Net code-behind||2||36|
|jquery progress bar||3||21|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
27 Experts available now in Live!