Re: OnUploadCompleted Not firing in code behind.

  •  08-31-2010, 9:23 AM

    Re: OnUploadCompleted Not firing in code behind.

    Dear Tarus,
     
    Please try the following tested code, it works:
     
    AspxAndCSSeparate.aspx:
     
    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="AspxAndCSSeparate.aspx.cs" Inherits="AspxAndCSSeparate" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
       
        </div>
        <CuteWebUI:UploadAttachments ID="UploadAttachments1" runat="server"
            onfileuploaded="Uploader_FileUploaded">
        </CuteWebUI:UploadAttachments>
        </form>
    </body>
    </html>
     
    AspxAndCSSeparate.aspx.cs:
     
    public partial class AspxAndCSSeparate : System.Web.UI.Page
    {
          protected void Uploader_FileUploaded(object sender, CuteWebUI.UploaderEventArgs args)
        {      
            //Copys the uploaded file to a new location.
            args.CopyTo("c:\\temp\\"+args.FileName);    
        }
    }
     
    Thanks for asking
     
View Complete Thread