Hi Friends, Kindly tell me how to delete files and that folder in a class file Data access layer file.
THANKS IN ADVANCE
This will delete Data folder and files inside that folder.
protected void Delete(object sender, EventArgs e) { DirectoryInfo di = new DirectoryInfo(Server.MapPath("~/DAL/Data")); if (di.Exists) { di.Delete(true); } }
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.