Hi,
I can upload the image through IE without any issue,when i try to upload the Image through Netscape,I am getting error "Could not find a part of the path "c:\inetpub\wwwroot\Up_Img\images\"." (Where Image is supposed to be saved).I am using VS.NET 2003.Please help me.
Code Below,
If Not (fileupload1.PostedFile Is Nothing) Then
Dim strLongFilePath As String = fileupload1.PostedFile.FileName
Dim intFileNameLength As Integer = InStr(1, StrReverse(strLongFilePath), "\")
strFileName = Mid(strLongFilePath, (Len(strLongFilePath) - intFileNameLength) + 2)
If fileupload1.PostedFile.InputStream.Length < 500000 Then
Select Case fileupload1.PostedFile.ContentType
Case "image/pjpeg", "image/jpeg", "image/gif", "image/png"
fileupload1.PostedFile.SaveAs(Server.MapPath("images/") & strFileName)
lbStatus.ForeColor = System.Drawing.Color.Green
lbStatus.Text = strFileName & " has been uploaded successfully. "
Case Else
lbStatus.ForeColor = System.Drawing.Color.Red
lbStatus.Text = "Not a valid image"
End Select
Else
lbStatus.ForeColor = System.Drawing.Color.Red
lbStatus.Text = "Image Size is too Large"
End If
End If
Regards,
John.