I have a Gridview which displays the filenames in the database.

I have written code for deleting filename entry from database, but I also want to delete it from the directory, so how do I retrieve filename from Gridview ?
I don’t want to execute another select command for retrieving filename.
Code :
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
int Fid = (int)GridView1.DataKeys[e.RowIndex].Value;
sdsFiles.DeleteCommand = "Delete from Files where Fid = @id";
sdsFiles.DeleteParameters.Clear();
sdsFiles.DeleteParameters.Add("id",Fid.ToString());
sdsFiles.Delete();
System.IO.Directory.Delete(Server.MapPath("~/Data/"));
}
Thanks.
Use the following code and do steps;
you must go to gridview columns
window
Convert to file name column to
TemplateField
Save and Exit GridView Columns window
Go to Files column template design
Set label id "Label1"
Go to code and use it