<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="Default_aspx" %>
Untitled Page
File: Default.aspx.vb
Partial Class Default_aspx
Inherits System.Web.UI.Page
Protected Sub Submit_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Dim savePath As String = Request.PhysicalApplicationPath
savePath += "uploads\"
If FileUpload1.HasFile Then ' verify if there is file to upload
savePath += FileUpload1.FileName
' existing file will be overwritten
FileUpload1.SaveAs(savePath)
Response.Write("File uploaded successfully!")
Else
Response.Write("No file to upload")
End If
End Sub
End Class