hi all
I have a page where i upload image file to web server and my code is as follows
but when i upload it give error as follow:
"Access to the path "D:\WEBDATA\... .\....." deneid"
plz help me out to solve this problem and what changes i have to in the code.
I have a page where i upload image file to web server and my code is as follows
but when i upload it give error as follow:
"Access to the path "D:\WEBDATA\... .\....." deneid"
Code:
If Not FileUpload1.PostedFile Is Nothing And FileUpload1.PostedFile.ContentLength > 0 Then Dim fn As String = System.IO.Path.GetFileName(FileUpload1.PostedFile.FileName) Dim SaveLocation As String = Server.MapPath("Classifieds") & "\" & fn Try FileUpload1.PostedFile.SaveAs(SaveLocation) lblRes.Text = "The file has been uploaded." Catch Exc As Exception lblRes.Text = "Error: " & Exc.Message End Try Else lblRes.Text = "Please select a file to upload." End If
Comment