Hi,
I am currently using the filevistacontrol to control files in an online system. The filevista control communicates with a database. When i add/rename/move etc. a method is executed which updates the database.
When i want to delete a folder which has one or multiple subfolders i get an error message "Object reference not set to an instance of an object".. The control doesnt function anymore, but when i reload the page i see that the folders are deleted from the filesystem aswell as the database.
I was wondering if someone could tell me what goes wrong here.
Code snippets:
Code to delete the entry in the database:
protected void FileVistaControl_Deleted(object sender, FileVistaDeletedEventArgs e)
{
foreach (var name in e.ItemNames)
{
ContentDirectoryBO directory = _directoryLogic.GetContentDirectory(e.RelativePath, name, e.RootFolder.Name);
if (directory != null)
{
this.DeleteDirectory(directory, true);
}
}
}
i think there goes something wrong with reloading the control after de deletion of the folders but i cant figure out what goes wrong.
Any help would be appreciated.
Regards,
Gerard
Gerard
7/7/2010 5:16 AM
Hi Gerard,
Please see this topic for the reason of this problem:
Delete Folder with Session Timeout
Cem Alacayir
7/7/2010 5:26 AM
Thank you for the quick response. Much appreciated!
I will work out a solution based on the information in reply.
Gerard
Gerard
7/7/2010 6:25 AM