Live Support, Chat, Upload Control and Rich Text Editor
Welcome to Support forums Sign in | Join | Help |Client Center
in Search

Error: 'CuteWebUI.UploaderBase.Protected Overridable Sub OnFileUploaded(args As CuteWebUI.UploaderEventArgs)' is not accessible in this context because it is 'Protected'.

Last post 11-16-2009, 5:14 AM by swabygw. 5 replies.
Sort Posts: Previous Next
  •  11-15-2009, 9:16 PM 57151

    Error: 'CuteWebUI.UploaderBase.Protected Overridable Sub OnFileUploaded(args As CuteWebUI.UploaderEventArgs)' is not accessible in this context because it is 'Protected'.

    I keep getting error:
     
    'CuteWebUI.UploaderBase.Protected Overridable Sub OnFileUploaded(args As CuteWebUI.UploaderEventArgs)' is not accessible in this context because it is 'Protected'.
    Any ideas?
     
    Here's my code:
     
    Public u As New CuteWebUI.Uploader

    Protected Overrides Sub OnInit(e As EventArgs)
     MyBase.OnInit(e)
     u.onFileUploaded += new UploaderEventHandler(Uploader_FileUploaded)  - ERROR
    End Sub

    Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
     u.onuploadcompleted = "Uploader_FileUploaded"
     MainFormPlaceHolder.Controls.Add(u)
    End Sub

  •  11-15-2009, 9:44 PM 57153 in reply to 57151

    Re: Error: 'CuteWebUI.UploaderBase.Protected Overridable Sub OnFileUploaded(args As CuteWebUI.UploaderEventArgs)' is not accessible in this context because it is 'Protected'.

    Hi,
     
    onFileUploaded should change to FileUploaded
     
    Regards,
    Terry
     
  •  11-15-2009, 9:46 PM 57155 in reply to 57153

    Re: Error: 'CuteWebUI.UploaderBase.Protected Overridable Sub OnFileUploaded(args As CuteWebUI.UploaderEventArgs)' is not accessible in this context because it is 'Protected'.

    I changed:
    u.OnFileUploaded += new UploaderEventHandler(Uploader_FileUploaded)
     
    To:
    u.FileUploaded += new UploaderEventHandler(Uploader_FileUploaded)
     
    Got new error:
    'Public Event FileUploaded(sender As Object, args As CuteWebUI.UploaderEventArgs)' is an event, and cannot be called directly. Use a 'RaiseEvent' statement to raise an event.
  •  11-15-2009, 9:47 PM 57157 in reply to 57155

    Re: Error: 'CuteWebUI.UploaderBase.Protected Overridable Sub OnFileUploaded(args As CuteWebUI.UploaderEventArgs)' is not accessible in this context because it is 'Protected'.

    Actually, do u have a simple example of how to implement this in VB.NET (not ASP tags) programmatically?
  •  11-16-2009, 1:11 AM 57162 in reply to 57157

    Re: Error: 'CuteWebUI.UploaderBase.Protected Overridable Sub OnFileUploaded(args As CuteWebUI.UploaderEventArgs)' is not accessible in this context because it is 'Protected'.

    Hi,
     
    Use VB.NET
     
    The syntax is
     
    AddHandler u.FileUploaded, AddressOf Uploader_FileUploaded
     
    Regards,
    Terry
     
  •  11-16-2009, 5:14 AM 57171 in reply to 57162

    Re: Error: 'CuteWebUI.UploaderBase.Protected Overridable Sub OnFileUploaded(args As CuteWebUI.UploaderEventArgs)' is not accessible in this context because it is 'Protected'.

    Got it working (didn't need the OnInit stuff) -- thanks.  Code:
     
    Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
     Dim u As New CuteWebUI.Uploader
     AddHandler u.FileUploaded, AddressOf uploader_FileUploaded 
     MainFormPlaceHolder.Controls.Add(u)
    End Sub
View as RSS news feed in XML
Powered by ASP.Net
Copyright 2003 - 2017 CuteSoft Components Inc.. All rights reserved.