Re: temp file path

  •  06-01-2009, 1:33 PM

    Re: temp file path

    It works for me.
     
    I am using the following code:
     
    1. <%@ Page Language="VB" %>   
    2. <script runat="server">   
    3.     Protected Overloads Overrides Sub OnInit(ByVal e As EventArgs)   
    4.         MyBase.OnInit(e)   
    5.         AddHandler Uploader1.FileUploaded, AddressOf Uploader_FileUploaded   
    6.         Dim sUploadTempPath As String = System.Configuration.ConfigurationManager.AppSettings("FileUploadTempPath")   
    7.         If sUploadTempPath <> "" Then   
    8.             Uploader1.TempDirectory = sUploadTempPath   
    9.             Uploader1.AutoUseSystemTempFolder = False   
    10.         Else   
    11.             Uploader1.AutoUseSystemTempFolder = True   
    12.         End If   
    13.     End Sub   
    14.   
    15.     Private Sub Uploader_FileUploaded(ByVal sender As Object, ByVal args As UploaderEventArgs)   
    16.         Dim uploader As Uploader = DirectCast(sender, Uploader)   
    17.         'Copys the uploaded file to a new location.    
    18.         'args.CopyTo("c:\\temp\\"& args.FileName)   
    19.     End Sub   
    20. </script>   
    21. <html xmlns="http://www.w3.org/1999/xhtml" >   
    22. <body>   
    23.     <form id="form1" runat="server">      
    24.     <CuteWebUI:Uploader runat="server" ID="Uploader1" MultipleFilesUpload="true"></CuteWebUI:Uploader>   
    25.      </form>   
    26. </body>   
    27. </html>  

    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