OnFileUploaded event does not fire in Firefox

Last post 10-27-2010, 2:42 PM by nokturnal. 10 replies.
Sort Posts: Previous Next
  •  06-30-2009, 11:35 AM 53641

    OnFileUploaded event does not fire in Firefox

    Hi  there,
    I have written a event handler for onfileuploaded event, this eventhandler gets called in IE but in firefox it does not work. Someone please help urgently.
    thanks
  •  06-30-2009, 12:18 PM 53643 in reply to 53641

    Re: OnFileUploaded event does not fire in Firefox

    Hi,
     
    Did you get any javascript error ?
     
    Did the page submit after the files be uploaded?
     
    Do you use AJAX ?
     
    Regards,
    Terry
  •  06-30-2009, 12:45 PM 53647 in reply to 53643

    Re: OnFileUploaded event does not fire in Firefox

    Hi Terry,
    In my web app  the page on which i m putting this ajaxuploader control is  derived from a pagebase class and also a masterpage.   I made one test page just like my other page(deriving from pagebase and also from master page)  and put the ajaxuploader control and ran it in firefox and the  onfileuploaded event got fired.  It worked fine on test page in my webapp....
     
     
    I do not know what is choking the event to get fired on the  real page !!
     
    Can we do a gotomeeting?
  •  06-30-2009, 1:06 PM 53648 in reply to 53647

    Re: OnFileUploaded event does not fire in Firefox

    Hi,
     
    You need compare the code.
     
    Can you post the code ?
     
    Regards,
    Terry
  •  06-30-2009, 1:13 PM 53649 in reply to 53648

    Re: OnFileUploaded event does not fire in Firefox

    <%@ Register Namespace="CuteWebUI" Assembly="CuteWebUI.AjaxUploader" TagPrefix="CuteWebUI" %>

    <asp:Content ID="Content1" ContentPlaceHolderID="SiteContent" runat="Server">
                                          <asp:Button ID="btnUpload" Text="browse" runat="server" />
                <CuteWebUI:UploadAttachments  EnableViewState="true"  OnFileUploaded="Uploader_FileUploaded" OnUploadCompleted="Uploader_UploadComplete"
                    ShowFileIcons="true" InsertButtonID="btnUpload" runat="server" ID="Attachments1">
                </CuteWebUI:UploadAttachments>
                 <asp:DataGrid OnItemCommand="OnFileRemove_Click" Font-Size="small"    runat="server" ID="articleList" ShowHeader="false"   AutoGenerateColumns="False"
                AlternatingItemStyle-BackColor="#eeeeee">
                <Columns>
                    <asp:BoundColumn DataField="Name" />
                    <asp:ButtonColumn ButtonType="PushButton" Text="Remove" />
                </Columns>
            </asp:DataGrid>
           <br />
     
    =====================
    code behind
    =====================
     
      protected void Uploader_UploadComplete(object sender, UploaderEventArgs[] args)
        {
            ShowUploadedFiles();

        }

        private void ShowUploadedFiles()
        {
            DirectoryInfo objDir = new DirectoryInfo(@"C:\Dump\test\");
            if (objDir.GetFiles().Length > 0)
            {
                articleList.DataSource = objDir.GetFiles();
                articleList.DataBind();
                articleList.Visible = true;
            }
            else
            {
                articleList.Visible = false;
            }

        }

        protected void Uploader_AttachmentCreated(object sender, AttachmentItemEventArgs args)
        {
            args.Item.MoveTo(@"C:\Dump\test\" + args.Item.FileName);
          
        }
        protected void Uploader_FileUploaded(object sender, UploaderEventArgs args)
        {
            try
            {

                //ONCE FILE UPLOADED TO TEMP FOLDER MOVE THEM TO USER SESSION TEMP FOLDER
                args.MoveTo(@"C:\Dump\test\" + args.FileName);
            }
            catch (Exception ex)
            {
                args.Delete();
                ShowErrorMsg(ex.Message);


            }

        }

        private void ShowErrorMsg(string sMSG)
        {
            lblMsg.Text = "Error : " + sMSG;
        }

        protected void OnFileRemove_Click(object sender, DataGridCommandEventArgs args)
        {
            try
            {
                string sFile = @"C:\Dump\test\" + args.Item.Cells[0].Text;
                if (File.Exists(sFile))
                {
                    File.Delete(sFile);
                    ShowUploadedFiles();

                }
            }
            catch (Exception ex)
            {
                ShowErrorMsg(ex.Message);

            }
     
     
     
  •  06-30-2009, 1:20 PM 53650 in reply to 53649

    Re: OnFileUploaded event does not fire in Firefox

    Hi,
     
    Did you tested it in IE ??
     
     
    Regards,
    Terry
     
  •  06-30-2009, 1:25 PM 53651 in reply to 53650

    Re: OnFileUploaded event does not fire in Firefox

    In which code you can get the FileUploaded event work ?
     
  •  06-30-2009, 1:25 PM 53652 in reply to 53650

    Re: OnFileUploaded event does not fire in Firefox

    it works fine in IE, It also works fine in firefox  on my test page but when i integrate with my web page in web app it still works in IE but then it does not work in firefox
  •  06-30-2009, 9:42 PM 53662 in reply to 53652

    Re: OnFileUploaded event does not fire in Firefox

    When you test the Firefox , are you sure the page posted back ?
     
    Regards,
    Terry
     
  •  07-01-2009, 11:52 AM 53677 in reply to 53662

    Re: OnFileUploaded event does not fire in Firefox

    Hi Terry,
    I found that there was one another  word processer control on the web page that was interfering with ajaxuploader, Once I took that out, the ajaxuploader  event fired as expected.  So I am good now.. I have put it on QA box , lets see how it goes in testing in IE , Firefox, and on mac 
     
    Thanks for you support...will keep you posted.
     
    Best Regards
  •  10-27-2010, 2:42 PM 64738 in reply to 53677

    Re: OnFileUploaded event does not fire in Firefox

    Can I get some more info regarding your solution?  What "wordr processer" control was interfering with the ajaxuploader?
View as RSS news feed in XML