By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,353 Members | 1,235 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,353 IT Pros & Developers. It's quick & easy.

this is used by another process while deleting the file

P: 4
Hi ,
i am using asp.net2.0
in that DirectoryInfo object for reading the files.
i have added each file record to DataTable object.
and bind that to gridview and added one templete field for delete.
while deleting the image irs showing an error......
this is used by another process.......so i am not able to delete that file....
and dont wan to restart the IIS....

i have disposed the datatable object......still its not working....
pls replay with need full information and.... guidance........
May 29 '08 #1
Share this Question
Share on Google+
1 Reply


nateraaaa
Expert 100+
P: 663
Hi ,
i am using asp.net2.0
in that DirectoryInfo object for reading the files.
i have added each file record to DataTable object.
and bind that to gridview and added one templete field for delete.
while deleting the image irs showing an error......
this is used by another process.......so i am not able to delete that file....
and dont wan to restart the IIS....

i have disposed the datatable object......still its not working....
pls replay with need full information and.... guidance........
You will need to call Dispose on any object that has access to the file. The file in the datatable is just an in memory representation of the file. Try calling dispose on your DirectoryInfo object.
Nathan
May 29 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.