Get filename of posted file

  •  06-19-2009, 6:44 PM

    Get filename of posted file

    I'm using a fileupload control in my page end this little code to store the filename in the db:
     
    1. If uploader1.PostedFile.ContentLength <> 0 Then  
    2.             Dim spatie As String = uploader1.FileName.ToString  
    3.             spatie = spatie.Replace(" """)  
    4.             uploader1.PostedFile.SaveAs(Server.MapPath("/img/auto/") & uploader1.FileName.ToString)  
    5.   
    6. End If 
     I tried replace the normal fileupload component with the ajaxuploader, but i found no method to get the filename of the uploaded file. This has to be stored in my products table and the file has to be uploaded to folder ~/img/auto/
     
    How do i get the filename??? i''m using vb.net in the codebehind
View Complete Thread