I have a vb.net page that allows users to upload multiple files, and also stores data about the files in my sql database (FileID, FileName, etc). I then display a gridview with the names of the file, and a delete link button, so if the user uploads the wrong file, I want to let them delete the file, but I keep getting this error when trying to delete. If I hard code in a file name, the delete works fine, I just can't seem to grab the FileName from the gridview and delete a file from the directory when FileName matches the name of the uploaded document. Here's what I tried... I bolded the line that errors.. At this point though, I'm not even sure if I'm heading in the right direction... any ideas??
Protected Sub gvJLetters_RowDeleted(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeletedEventArgs) Handles gvLetters.RowDeleted
...
Go to the complete details ...