Hi all,
i am deleting files from temp folder on page unload. I want it to execute only when the page closed. but i whenever a message box shown it executes and deletes the files. how to manage this situation. I want it to delete the files only at page unload.
protected void Page_UnLoad(object sender, EventArgs e)
{
Session.Clear();
string[] Files = Directory.GetFiles(Server.MapPath("~/Temp/"));
foreach (string file in Files)
{
File.Delete(file);
}
}
Thank you..
Wish u all Happy Ramadan..
...
Go to the complete details ...