Hi everyone,
I am trying to upload files using AJAX Async FileUpload, it is working file on my local directory, but when I upload the page then it gives an error.
Her is my aspx code
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<br />
<cc1:AsyncFileUpload ID="AsyncFileUpload1" runat="server"
UploaderStyle="Modern" />
<br />
<asp:Button ID="Button1" runat="server" Text="Upload" />
And here is my vb code
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
If (AsyncFileUpload1.HasFile) Then
AsyncFileUpload1.SaveAs("/images/test/new.jpg")
End If
End Sub
but it is giving following error
System.IO.DirectoryNotFoundException: Could not find a part of the path 'c:\images\new.jpg'.
Also I want to read the name of file being uploaded and then append it with the uploading directory.
Thank You very much.