Code
To delete a file on server you can use code like this
[ C# ] // We need this namespaceusing System.IO; public partial class _Default : System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) { string FileToDelete; // Set full path to file FileToDelete = Server.MapPath("~/Files/SomeFile.txt"); // Delete a file File.Delete(FileToDelete); } }

meh lPosted Apr 19, 2011, 9:09 AM EDT
Tks other alternative is System.IO.File.Delete(path of file);
Suthish NairTOP 100Posted Dec 20, 2010, 5:00 AM EST
This must be in a blog section not article :)