These forums are read-only and considered to be an archive. Please use the new Community for future interaction and posts.

Uploaded Event (VB)

I have been trying to get the Uploaded event to trigger and cannot seem to...

Here is a code snippet...

        Dim myFVCtrl As FileVistaControl = DirectCast(LoadControl("~/FileVistaControl/filevista.ascx"), FileVistaControl)

        Dim rootFolder As FileVistaRootFolder

        rootFolder = New FileVistaRootFolder(userFolderName, userFolderPath)
        rootFolder.Permissions = FileVistaPermissions.Full
        myFVCtrl.RootFolders.Add(rootFolder)
        myFVCtrl.Style = "Width: 100%; Height: 600px;"

        FileVistaPlaceHolder.Controls.Add(myFVCtrl)

        ' have tried both of these...
        AddHandler FileVistaControl.Uploaded, AddressOf FileVistaControl_Uploaded
        ' AddHandler myFVCtrl.Uploaded, AddressOf FileVistaControl_Uploaded


      Private Sub FileVistaControl_Uploaded(ByVal sender As Object, ByVal e As FileVistaUploadedEventArgs)
        ' handle the Uploaded event...
        Me.lblStatus.Text = "File Uploaded OK!"
      End Sub

If I use the second AddHandler then VS2008 comes up with a "Access of shared member..." error/warning under the word Uploaded

Any help
Chris Grayson 8/2/2010 8:33 AM
The control events are not page level events so you can't reference a page object (update a Label) within an event. You may try System.Diagnostics.Debug.Write function to see your messages in the events.
Cem Alacayir 8/31/2010 6:55 AM