WreworMeteoke
New Member
I'm just starting to learn ASP.NET. I'm using VWD 2010 Express and am trying to delete a file via delete button in a GridView.Looking at examples on here and elsewhere, one method seems to be similar to this:\[code\]using System.IO;public void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e){ GridViewRow row = (GridViewRow)GridView1.Rows[e.RowIndex]; string filePath = row.Cells[3].Text; File.Delete(filePath); }\[/code\]Apologies if this is an idiotic noob question, but I'm stuck at the last line, with the error: \[code\]'File' does not contain a definition for 'Delete'\[/code\]I hope this is enough information for someone to point out where I'm going wrong but can post more code if needed. -EDIT- Solution explorer image added for clarity: