Re: Seems that the TempDirectory property is not working correctly anymore

  •  03-24-2009, 3:13 PM

    Re: Seems that the TempDirectory property is not working correctly anymore

    I made a test using the following code and it works fine.
     
    1. <script runat="server">      
    2.   
    3.         protected override void OnInit(EventArgs e)   
    4.         {   
    5.             base.OnInit(e);   
    6.   
    7.             PersistedFile1.FileChanged += new PersistedFileEventHandler(PersistedFile_FileUploaded);   
    8.         }   
    9.   
    10.         void PersistedFile_FileUploaded(object sender, PersistedFileEventArgs args)   
    11.         {   
    12.             InsertMsg("File is changed! " + args.FileName + ", " + args.FileSize + " bytes.");               
    13.             //Copys the uploaded file to a new location.   
    14.             args.CopyTo("c:\\temp\\" + args.FileName);   
    15.             //Opens the uploaded file's data stream.   
    16.             //System.IO.Stream data = args.OpenStream();   
    17.         }   
    18. </script>   
    19.   
    20. <CuteWebUI:UploadPersistedFile AutoUseSystemTempFolder="false" runat="server" ID="PersistedFile1" InsertText="Upload File">   
    21.  <VALIDATEOPTION MaxSizeKB="10240" />   
    22. </CuteWebUI:UploadPersistedFile>  
    Please try it and if you still have problems download the control again.
    Keep me posted


    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View Complete Thread