Do something like this :-
string FileName ="test.txt";
string Path = "E:\\" + FileName;
FileInfo file = new FileInfo(Path);
if (file.Exists)
{
file.Delete();
}
Get your file name from listview and then find the path then delete.
And do remember to include
using System.IO;
namespace.
So simple Isn't it?
Or
File.Delete(Server.MapPath(@"Images\SomeImage.png"));
here you can get your image name from list view.
Happy Holi.