User-933407369 posted
HI,
If the delete button is NOT clicked, then the uploader uploads the second file successfully...
According to your description, i suppose that you delete the directory path of files when you click delete button, then you save the files , but the directory path not exists.
i would suggest you try adding the codes below when you save the files:
if(!Directory.Exists(topPath))
{
Directory.CreateDirectory(topPath);
using (StreamWriter writer = File.CreateText(subPath + @"\example.txt"))
{
writer.WriteLine("content added");
}
}
// Directory.Delete(topPath, true);
please refer to the link for details:
http://msdn.microsoft.com/en-us/library/fxeahc5f(v=vs.110).aspx
if it is not helpful for you, you can provide any additional codes(for example: add, create etc.) or
markup page related to this issue? It may be a bit easier to resolve if it can be easily reproduced.
Thank you for your understanding.