Author: metalhead1984 | Posted on: 10/22/2008 5:05:53 AM | Views : 263

 I have a webpage which takes all the photo locations out of the database and displays the photos on the page in a gridview format I have a list of checkboxes next to each photo and a delete button I have got it so when the butrton is clicked all the photos with a checked box are deleted out of the database but I also want to delete them off the server as well the code i have for deleting the files of the sever is
string path = Convert.ToString(GridView1.Rows[Index].FindControl("PhotoLocationlbl"));
string filepath = path;
System.IO.File.Delete(filepath);
this code doesn't error but the photos are still on the server after its run can anyone help the rest of the code is
my aspx file
 <h1>Photo Admin</h1>
    <asp:FileUpload ID="fileUpload" runat="server" />
    <asp:Button ID="uploadButton" runat="server" Text="Upload!& ...

Go to the complete details ...