how to attach file from network drives
-
hi friends, i am using HTML FileField to pick a file for attachment.to pick a file i am using this code "btn_FileField.PostedFile.FileName", but it is working when picking file from local drives, and it is not working when pick a file from network mapped drives, is anybody having solutions.
-
hi friends, i am using HTML FileField to pick a file for attachment.to pick a file i am using this code "btn_FileField.PostedFile.FileName", but it is working when picking file from local drives, and it is not working when pick a file from network mapped drives, is anybody having solutions.
-
hi guffa, if i pick a file(using HTML FileField) from network drives(i.e., another system from my Local Area Netowrk or from the server) then the following error occurs. Error: ===== Couldnot find part of the path"K:\aa\bb.doc".
-
hi friends, i am using HTML FileField to pick a file for attachment.to pick a file i am using this code "btn_FileField.PostedFile.FileName", but it is working when picking file from local drives, and it is not working when pick a file from network mapped drives, is anybody having solutions.
-
First upload the file to server in any folder, then use it as attachement, send the email and delete the file from the server after sending email.. Salim Akbar
-
dear salim, actually i can be able to attach and upload the file to sql server only form my local drives (C:, D:)etc., bu i can't be able to pick and upload the files from the another computers available in my Local Area Network.
Well, can you paste the part of code that you are using to upload. The following code just works fine to upload fiels from the network. Dim myFile As HttpPostedFile = getFile.PostedFile If IsNothing(myFile) Then lbl.Text = "please select a file to opload" : Exit Sub If myFile.ContentLength = 0 Then lbl.Text = "cannot upload zero length file" : Exit Sub Dim fileN As String = IO.Path.GetFileName(getFile.PostedFile.FileName) myFile.SaveAs(server.mappath("/upload") & fileN) lbl.Text = "i got it " where getFile is the HTML file field... Salim Akbar
-
Well, can you paste the part of code that you are using to upload. The following code just works fine to upload fiels from the network. Dim myFile As HttpPostedFile = getFile.PostedFile If IsNothing(myFile) Then lbl.Text = "please select a file to opload" : Exit Sub If myFile.ContentLength = 0 Then lbl.Text = "cannot upload zero length file" : Exit Sub Dim fileN As String = IO.Path.GetFileName(getFile.PostedFile.FileName) myFile.SaveAs(server.mappath("/upload") & fileN) lbl.Text = "i got it " where getFile is the HTML file field... Salim Akbar
dear salim, i used the code "getfile.postedfile.Filename" but it throws the error, eventhough i tried ur code "IO.Path.GetFileName(getFile.PostedFile.FileName)" but it returns only the filename and not along with the path.i hope u got my question correctly.for ur reference once again i explain. problem: ======== In my local Area Network there are 5 computers and one server.Everybody have right to access(Read,Write,Delete) a folder which is in the server.i am making web application.in my application i am using HTML file field for attaching file.If i pick a file from the server's accessible folder then it will throw an exception "Could not find part of the filename".but if i select a file from my local harddrives then it works without any problem.
-
dear salim, i used the code "getfile.postedfile.Filename" but it throws the error, eventhough i tried ur code "IO.Path.GetFileName(getFile.PostedFile.FileName)" but it returns only the filename and not along with the path.i hope u got my question correctly.for ur reference once again i explain. problem: ======== In my local Area Network there are 5 computers and one server.Everybody have right to access(Read,Write,Delete) a folder which is in the server.i am making web application.in my application i am using HTML file field for attaching file.If i pick a file from the server's accessible folder then it will throw an exception "Could not find part of the filename".but if i select a file from my local harddrives then it works without any problem.