Re: Cannot use CopyTo() on IIS 7 (windows vista)

  •  01-10-2012, 7:21 AM

    Re: Cannot use CopyTo() on IIS 7 (windows vista)

    Hi Lonniekong,
     
    Please try the example below, it will save the upload file to the root of your site. Does it work for you?
     
    <%@ Page Language="C#" Title="Customize the queue UI" %>
    <%@ Register TagPrefix="CuteWebUI" Namespace="CuteWebUI" Assembly="CuteWebUI.AjaxUploader" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
    <script runat="server">
        protected void UploadAttachments1_FileUploaded(object sender, UploaderEventArgs args)
        {
            args.CopyTo("~/"+args.FileName);
        }
    </script>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
    </head>
    <body>
        <form id="Form1" runat="server">
            <CuteWebUI:UploadAttachments runat="server" ID="UploadAttachments1" OnFileUploaded="UploadAttachments1_FileUploaded">
            </CuteWebUI:UploadAttachments>
        </form>
    </body>
    </html>
     
    Regards,
     
    Ken 
View Complete Thread