title: Display images after uploading with uploadify in asp.net
body: <p>I am trying to upload images using jquery uploadify and I am trying to display images in the data list view control.</p>
  
  <p>The problem is I am not able to upload multiple images at a time <code>although</code> I have set the <code>"Multi" property to "TRUE".</code></p>
  
  <p>I'm not understanding where I am going wrong?</p>
  
  <p>Here is my code:</p>
  
  <pre><code>&lt;script type = "text/javascript"&gt;
  
  $(document).ready(function()
  {   
      $("#&lt;%=FileUpload1.ClientID%&gt;").uploadify({
          'uploader'       : 'scripts/uploadify.swf',
          'script'         : 'Upload.ashx',
          'cancelImg'      : 'images/cancel.png',
          'folder'         : 'uploads',
          'multi'          : true,
          'auto'           : true,
          'onComplete': function (event, queueID, fileObj, response, data) {
                       $('#dtlist).append('&lt;img src="' + response + '" /&gt;');
        }
     });
  
  });     
  </code></pre>
  
  <p> </p>
  
  <p>Upload.ashx code:</p>
  
  <pre><code>&lt;%@ WebHandler Language="VB" Class="UploadVB" %&gt;
  </code></pre>
  
  <p>Imports System
  Imports System.Web
  Imports System.IO</p>
  
  <p>Public Class UploadVB : Implements IHttpHandler</p>
  
  <pre><code>Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
      Dim postedFile As HttpPostedFile = context.Request.Files("Filedata")
  
      Dim savepath As String = ""
      Dim tempPath As String = ""
  
      tempPath = context.Request("folder")
  
      'If you prefer to use web.config for folder path, uncomment below:
      'tempPath = System.Configuration.ConfigurationManager.AppSettings("FolderPath")
  
  
      savepath = context.Server.MapPath(tempPath)
      Dim filename As String = postedFile.FileName
      If Not Directory.Exists(savepath) Then
          Directory.CreateDirectory(savepath)
      End If
  
      postedFile.SaveAs((savepath &amp; "\") + filename)
      context.Response.Write((tempPath &amp; "/") + filename)
      context.Response.StatusCode = 200
  End Sub
  
  Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable
      Get
          Return False
      End Get
  End Property
  </code></pre>
  
  <p>End Class</p>
  
  <p>And this my front end code:</p>
  
  <pre><code> &lt;form id="form1" runat="server"&gt;
          &lt;br/&gt;
          &lt;div class="demo"&gt;
  
              &lt;asp:FileUpload ID="FileUpload1" runat="server" /&gt;
  
              &lt;asp:Button ID="btnUpload" runat="server" onclick="btnUpload_Click" 
                  Text="Upload" /&gt;
  
          &lt;/div&gt;
          &lt;/form&gt;
  </code></pre>