title: How do I load content into Request.Files collection for latter retrieval on server side?
body: <p>I'm using a multi-upload input control and it is not server sided i.e pure HTML not asp: tagged.</p>
  
  <p>Now the issue is on the server side I'm trying to access the Request object's Files collection hoping that after an upload, the input control will put the files into this collection in question. </p>
  
  <p>I even imported some scripts in javascript to make it work but whenever I step through the code behind, the Request.Files property, which should contain the browsed and chosen files, is always empty. What should I do? Ooooops! sorry i didnt show some code:</p>
  
  <pre><code>var x = this.Page.FindControl("FileUpload1");
  
              lbuploadmessage.Text = x.GetType().ToString();
  
            HttpFileCollection hfc = Request.Files; 
              List&lt;L2SQLData.PatientFile&gt; list = new List&lt;L2SQLData.PatientFile&gt;();
              for (int i = 0; i &lt; hfc.Count; i++)
              {
                  HttpPostedFile hpf = hfc[i];
                  if (hpf.ContentLength &gt; 0 &amp;&amp; hpf.ContentLength &lt; 1024000)
                  {
                      string filename = Path.GetFileName(hpf.FileName);
                      string ext = Path.GetExtension(hpf.FileName);
                      var guidname = Guid.NewGuid().ToString();
                      //FileUpload1.SaveAs(Server.MapPath("~/Uploads/DocClerkings/") + guidname + ext);
  
                      hpf.SaveAs(Server.MapPath("~/Uploads/DocClerkings/") + guidname + ext );
                      lbuploadmessage.Text = "Upload status:" + hpf.FileName + " successfully uploaded!";
  </code></pre>
  
  <p>As you can see I named the control-"FileUpload1" but at runtime (Debug) the object x is null and Request.Files collection that's supposed to contain the browsed files is empty too. The multi - upload control looks like this:</p>
  
  <pre><code>&lt;input id = "FileUpload1" type="file" class="multi"/&gt;
  </code></pre>
  
  <p>with two scripts i added as follows:</p>
  
  <pre><code>&lt;script src="jquery-latest.js" type="text/javascript" language="javascript"&gt;&lt;/script&gt;
  &lt;script src="jquery.MultiFile.js" type="text/javascript" language="javascript"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>So what did I leave out?</p>
  
  <p>Cheers </p>