title: Post image with Ajax and receive it in MVC action controller with Request.Files[""]
body: <p>I have a HTML Razor View Like this:</p>
  
  <pre><code>@using (Html.BeginForm("Insert", "Operation", FormMethod.Post, new { @class = "form-horizontal", enctype = "multipart/form-data", id = "image_form" }))
  {
     &lt;div&gt;
          &lt;span class="btn btn-default "&gt;
          &lt;span class="fileinput-new"&gt;Up Your Image&lt;/span&gt;
          &lt;input type="file" name="nationalCard" id="nationalCard"&gt;
          &lt;/span&gt;
    &lt;/div&gt;
    &lt;input type="button" class="btn btn-default" id="submit_image" onclick="insert()" value="ثبت" /&gt;
  }
  </code></pre>
  
  <p>My Jquery Ajax codes are:</p>
  
  <pre><code> function insert() {
      var formData = $("#image_form");
      $.ajax({
          type: "POST",
          url: '@Url.Action("Insert", "Operation")',
          data: formData.serialize(),
          dataType: "json",
          success: function (data) {
              //do something...
          },
      });
  };
  </code></pre>
  
  <p>So I want to receive image in action controller Based on Request object and Files property like this :</p>
  
  <pre><code> [HttpPost]
   public ActionResult Insert()
   {
     if (Request.Files.Count &gt; 0)
     {
        var image = Request.Files["nationalCard"];
        //do something...
     }
   }
  </code></pre>
  
  <p>I have tried this and in action didn't receive file.any idea who can I do that?</p>