Re: Using Multiple "Single File Upload" in a single Page

  •  01-28-2013, 6:04 PM

    Re: Using Multiple "Single File Upload" in a single Page

    Kenneth:

    Hi Jagmohan,

     

    The asp uploader does not support to use multiple instances in the same page, I suggest you use Iframe taget to achieve it.

     

    Regards,

     

    Ken

     

    Ken,

     

    Care to give us an example of how to achieve this? 

    I tried to modify the current sample of single file, but no luck.

     

    1. <%@ Language="VBScript" %>  
    2. <!-- #include file="aspuploader/include_aspuploader.asp" -->  
    3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">  
    4. <html xmlns="http://www.w3.org/1999/xhtml">  
    5. <head>  
    6.     <title>  
    7.         Form - Single File Upload  
    8.     </title>  
    9.     <link href="demo.css" rel="stylesheet" type="text/css" />  
    10. </head>  
    11. <body>  
    12.     <div class="demo">  
    13.                           
    14.         <h2>Single File Upload</h2>  
    15.         <p> A basic sample demonstrating the use of the Upload control (Allowed file types: <span style="color:red">jpg, gif, png, zip, pdf</span>).</p>  
    16.           
    17.         Upload 1:  
    18.         <%  
    19.             Dim uploader  
    20.             Set uploader=new AspUploader  
    21.             uploader.Name="myuploader"  
    22.               
    23.             uploader.MaxSizeKB=4096  
    24.             uploader.InsertText="Upload File (Max 4MB)"  
    25.             uploader.AllowedFileExtensions="*.jpg,*.png,*.gif,*.zip,*.pdf"  
    26.             uploader.MultipleFilesUpload=false  
    27.               
    28.             'Where'd the files go?  
    29.             uploader.SaveDirectory=""  
    30.               
    31.             uploader.render()  
    32.         %>  
    33.           
    34.         <br/><br/>  
    35.         Upload 2:  
    36.         <%  
    37.             Dim uploader2  
    38.             Set uploader2=new AspUploader  
    39.             uploader2.Name="myuploader2"  
    40.               
    41.             uploader2.MaxSizeKB=4096  
    42.             uploader2.InsertText="Upload File (Max 4MB)"  
    43.             uploader2.AllowedFileExtensions="*.jpg,*.png,*.gif,*.zip,*.pdf"  
    44.             uploader2.MultipleFilesUpload=false  
    45.               
    46.             'Where'd the files go?  
    47.             uploader2.SaveDirectory=""  
    48.               
    49.             uploader2.render()  
    50.         %>  
    51.           
    52.         <br/><br/>  
    53.           
    54.               
    55.     <script type='text/javascript'>  
    56.     function CuteWebUI_AjaxUploader_OnTaskComplete(task)  
    57.     {  
    58.         alert(task.FileName + " is uploaded!");  
    59.     }  
    60.     </script>  
    61.                           
    62.     </div>  
    63. </body>  
    64. </html>  

     

View Complete Thread