File.Delete
does not accept wild cards, so the
* is an invalid character.
You could try iterating over all the files that match the search pattern like this:
DirectoryInfo directory = new DirectoryInfo(Server.MapPath("~reports"));
foreach (FileInfo file in
directory.GetFiles(String.Format("{0}*.pdf",
ASPxDropDownEdit1.SelectedItem.Text)))
{
file.Delete();
}
Hope this helps,
Fredrik