In windows form in button click event how to export the file in a location select by showdialog & it will be delete permanently at a same time.How can i do this!
because in .net it will produces error "IO Exception was unhandled" or "The process can not access the file because it is used by anather process." .In button click event how to export the file & delete at same time in vb.net windows application.Please give me the links & urls about that issue.


Now, without seeing your code, I cannot give you the solution code. What I don't understand is: why would you write something into file and delete it?
I can't be sure(without seeing your code)but what the problem maybe is: you are not releasing the file handle before deleting it. i.e the file handle may be open so windows gets a lock on it, and then when you try to delete it, it won't let you. Close the file handle after saving using the close function of whatever stream you are using. Then try to delete it