Posted on: 7/9/2012 12:24:07 AM | Views : 225

I don't know why, but I keep getting error with this upload script:

Public Class Produse1 Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load End Sub Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim myFileName As String myFileName = FileUpload1.PostedFile.FileName Dim c As String = System.IO.Path.GetFileName(myFileName) Try FileUpload1.PostedFile.SaveAs("Poze/Produse/" & c) MsgBox("File successfully uploaded!") Catch ex As Exception MsgBox("! Upload ! failed !") End Try End Sub End Class This is the relevant page code:
<asp:FileUpload ID="FileUpload1" runat="server" size="60" /> <br /> <asp:Button ID="Button1" runat="server" Text="Upload ima ...

Go to the complete details ...