<ItemTemplate>
<asp:Label ID="lblFile" runat="server" Text='<%# Eval("Filename") %>'></asp:Label>
<asp:LinkButton ID="linkButton1" CommandName="Delete" runat="server" Text="Delete" />
</ItemTemplate>
and Implement the RowCommand Event:
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "Delete")
{
/* DELETE FROM DATABASE */
GridViewRow row = (GridViewRow)(((LinkButton)e.CommandSource).NamingContainer);
string fileName = ((Label)row.FindControl("lblFile")).Text;
// Code to fire Delete with query "DELETE from table1 where url=fileName
/* DELETE FROM DIRECTORY */
string path = Server.MapPath("~/Docs/") + fileName;
System.IO.Directory.Delete(path, true);
}
}