title: Post Images from Two upload controls in one view MVC
body: <p>I have two file upload control. the first control accepts single file of type image which is basically the Product Icon. the second upload control allows multiple image uploads and it contains several images of the product.</p>
  
  <p>Now I am able to Upload files successfully using following code</p>
  
  <pre><code>for (int i = 0; i &lt; Request.Files.Count; i++)
          {
              var file = Request.Files[i];
  
              if (file != null &amp;&amp; file.ContentLength &gt; 0)
              {
                  if (validImageTypes.Contains(file.ContentType))
                  {
                      var fileName = Path.GetFileName(file.FileName);
                      LocationImage fileDetail = new LocationImage()
                      {
                          FileName = fileName,
                          Extension = Path.GetExtension(fileName),
                          ID = Guid.NewGuid()
                      };
                      fileDetails.Add(fileDetail);
                      var path = Path.Combine(Server.MapPath("~/Upload/Images"), fileDetail.ID + fileDetail.Extension);
                      file.SaveAs(path);
                  }
  </code></pre>
  
  <p>This piece of code is saving file perfectly but i want to save the icon files in a separate Directory I somehow want to know that the file is coming from single upload control so that i can save it in Icon folder.</p>