title: how to send uploaded file from javascript to controller in MVC?
body: <p>In my MVC, i have a view and that contains one file upload control and one button.</p>
  
  <pre><code> &lt;input type="file" id="Uploadfile" /&gt;
   &lt;input type="button" onclick()="GetFile();/&gt;
  </code></pre>
  
  <p>Javascript function as follows</p>
  
  <pre><code>  function GetFile()
    {
        var file_data = $("#Uploadfile").prop("files")[0];
        window.location.href="Calculation/Final?files="+file_data;
    }
  </code></pre>
  
  <p>I need to pass/send the selected file via fileupload control to controller in mvc.
    i have the controller </p>
  
  <pre><code>public ActionResult Final(HttpPostedFileBase files)
    {
       //here i have got the files value is null.
    }
  </code></pre>
  
  <p>How to get the selected file and send it to the controller?
     Plz help me to fix this issue.</p>