Posted file NULL in IsDeleting


Great control, this is the first issue I have found with it. I need the filename of the file being deleted during IsDeleting to do do some database cleanup, but upload.PostedFile is null.


Bridges wrote Feb 2, 2009 at 9:48 AM

You can obtain this name from private fields.
I did next:

private string GetFilePath(string requestPath)
        int slashIndex = requestPath.LastIndexOf("/");
        if (slashIndex < requestPath.Length)
            requestPath = requestPath.Remove(0, slashIndex+1);

        return requestPath;

    public string RemovingFile
        get { return this.IsDeleting ? GetFilePath(clave3Value) : String.Empty; }
Maybe, it's isn't correct, but it works

wrote Jun 3, 2010 at 6:22 PM

wrote Feb 14, 2013 at 7:25 PM