Click here to Skip to main content
15,902,938 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
When I am uploading a file then it give the error at folder name.The error is cannot access a closed file.
VB
fuDocument.SaveAs(Server.MapPath("~/Attachments/") & DocName)

How we can solved this error.

Please help me.

Thanks
Posted
Updated 22-Dec-11 19:48pm
v2

 
Share this answer
 
v2
Comments
thatraja 23-Dec-11 2:43am    
This should help the OP, 5!
Monjurul Habib 23-Dec-11 5:28am    
thank you RAJA
Hi,

try this one:

C#
fuDocument.SaveAs(Server.MapPath("Attachments") + "\\" + fuDocument.FileName);
 
Share this answer
 
Clean Solution
and Build Again.
It worked for me
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900