Io ho usato questo e funziona:
Sub Upload(Source As Object, e As EventArgs)
___
If Not (myFile.PostedFile Is Nothing) Then
_ Dim intFileNameLength as Integer
_ ______Dim strFileNamePath as String
_ ______Dim strFileNameOnly as String___
_ ____________
_ ________'Logic to find the FileName (excluding the path)
_ ________
_____strFileNamePath = MyFile.PostedFile.FileName
_____intFileNameLength = Instr(1,StrReverse(strFileNamePath), "\")
_____strFileNameOnly = Mid(strFileNamePath,(Len(strFileNamePath)-intFileNameLength)+2)
_____myFile.PostedFile.SaveAs("c:\ li tuo path \" & strFileNameOnly)
_lblMsg.Text = "File Upload Success."
__End If
__
__End Sub
<html>
<head>
</head>
<body>
<h3>File Upload</h3>
<form enctype="multipart/form-data" runat="server">
File: <input id="myFile" type="file" runat="server">
<asp:label id="lblMsg" runat="server" />
<input type="button" value="Upload" OnServerClick="Upload" runat="server">
</form>
</body>
</html>