Hi,
Is it possible that each user get's a diffrent root-folder?
We have a personal folder for each user, is it possible that the filevista control uses the personal folder of the user thats currently logged in?
hope to hear from you soon,
Dave
12/2/2008 4:17 AM
Yeah!, this is something i'm olso wondering. Can Someone please tell us if this is possible?
Big thx!
Mike Litorus
12/2/2008 6:23 AM
If you use the programmatic approach (as is example 2) rather than tagPrefix method, you can determine via code in the host page, which folders the currently logged in user can access. Please see the example code below:
protected void Page_Load(object sender, EventArgs e)
{
string userName = "some user";
string userFolderName = "Folder of " + userName;
string userFolderPath = @"c:\user folders\" + userName;
FileVistaControl fileVistaControl =
(FileVistaControl)LoadControl("~/FileVistaControl/filevista.ascx");
FileVistaRootFolder rootFolder;
rootFolder = new FileVistaRootFolder(userFolderName, userFolderPath);
rootFolder.Permissions = FileVistaPermissions.Full;
fileVistaControl.RootFolders.Add(rootFolder);
PlaceHolder1.Controls.Add(fileVistaControl);
}
You should set userName, userFolderName and userFolderPath to the information you get from your authentication/membership system.
Cem Alacayir
12/2/2008 4:02 PM