Re: Uploader1.FileUploaded Event Being Raised Twice

  •  09-16-2009, 2:22 PM

    Re: Uploader1.FileUploaded Event Being Raised Twice

    Solution.

    WRONG way - PRODUCES DOUBLE CALLBACK
    <CuteWebUI:Uploader runat="server" ID="Uploader1" OnFileUploaded="Uploader_FileUploaded">
      <ValidateOption MaxSizeKB="10240" />
    </CuteWebUI:Uploader>



    CORRECT way - ELMINATES DOUBLE CALLBACK
    <CuteWebUI:Uploader runat="server" ID="Uploader1" >
      <ValidateOption MaxSizeKB="10240" />
    </CuteWebUI:Uploader>


    Apprently putting in the OnFileUploaded="Uploader_FileUploaded"
    into the vb.Net produces the second callback.  Once because the
    Handles Uploader1.FileUploaded is naturally called by VB and
    the second time because the HTML itself contains
    OnFileUploaded="Uploader_FileUploaded".

    CODE-BEHIND
    -----------
    Protected Sub Uploader_FileUploaded(ByVal sender As Object,
                                        ByVal args As CuteWebUI.UploaderEventArgs) _
                                        Handles Uploader1.FileUploaded << repetitive
                                        ==============================

                                        
    It was kind of a "duh" once I saw the solution.


    Thanks a ton for working through the solution with me.
     
    Gene
     
     
     
    Filed under:
View Complete Thread