I apologize, but I can't find documentation at all on FileControlVista.
I have an asp.net application and I successfully have the object in place and working.
Q1 - are there samples on how to control the object from vb? I want to dynamically add a root folder, set rights, and not do it via the aspx form itself (since I will be changing what folders the user sees based upon my SQL db)
Q2 - are there any events or way I can get control after a file is uploaded? I need my users to "profile" files with extra data after they are uploaded.
Thank you, I just started my evaluation today and am hoping I can do the above tasks.
-Rich
Rich
1/2/2009 8:03 AM
Q3 - Can I hide the Folders left side, define a single folder to show, and have it open?
Rich
1/2/2009 8:07 AM
Well, answered one of my questions myself after I saw the Example 2.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim rootFolder As GleamTech.Web.Controls.FileVistaRootFolder
rootFolder = New GleamTech.Web.Controls.FileVistaRootFolder("Test ASP.NET added folder", "c:\TestUpload")
rootFolder.Permissions = GleamTech.Web.Controls.FileVistaPermissions.Delete + GleamTech.Web.Controls.FileVistaPermissions.Upload + GleamTech.Web.Controls.FileVistaPermissions.List + GleamTech.Web.Controls.FileVistaPermissions.Download
Me.FileVistaControl.RootFolders.Add(rootFolder)
End Sub
Rich
1/2/2009 5:44 PM
(sorry you cant edit posts)
Q3 solved by another post in this forum:
<script language="javascript">
var divLeftPane = document.getElementById("divLeftPane");
divLeftPane.style.display="none";
var divPaneSeparator = document.getElementById("divPaneSeparator");
divPaneSeparator.style.display="none";
var divRightPane = document.getElementById("divRightPane");
divRightPane.style.left="0px";
</script>
I am betting I will find the remaining question (Q2) somewhere... heh.
Rich
1/2/2009 6:20 PM
Hi Rich,
Here is the sample code for using upload event in VB:
Private Shared areHandlersAdded As Boolean = False
Protected Sub Page_Load(sender As Object, e As EventArgs)
'Add your events within this if block
If Not areHandlersAdded Then
FileVistaControl.Uploaded += New EventHandler(Of FileVistaUploadedEventArgs)(FileVistaControl_Uploaded)
areHandlersAdded = True
End If
End Sub
Private Sub FileVistaControl_Uploaded(sender As Object, e As FileVistaUploadedEventArgs)
'You can use e.RootFolder.MapPath(e.RelativePath) to
'get the physical path of only the folder that the files are uploaded to
'Get the paths of the uploaded files by walking through UploadedFiles collection
Dim filePaths As String
For Each uploadedFile As GleamTech.Web.FileTransfer.UploadedFile In e.UploadProgress.UploadedFiles
filePaths += uploadedFile.FullPath + ", "
Next
End Sub
Cem Alacayir
1/6/2009 4:29 PM