title: How with FormData pass files and parameters to mvc controller action
body: <p>i am trying to pass files and parameters to MVC controller action. I can get my model, files in controller but cannot get my other variables in controllers such as <code>string CommunId, string CommunContext</code>, i know it might be because of these <code>false</code> parameters, but if i do not set it to <code>false</code> my controller action is not even invoked. Here is my code:</p>
  
  <pre><code>function submitNewCommunication(s, e) {
       // var data = new FormData($(this).serialize()); //tried this one also
  
          $.ajax({
              url: '@Url.Action("CreateCommunication", "Communications")',
              type: 'POST',
              data: new FormData($('.createCommunicationForm').get(0)),
              processData: false,
              contentType: false,
              success: function (result) {
                  alert('test'); 
              }
          });
  
  }
  </code></pre>
  
  <p>My View</p>
  
  <pre><code>@using (Html.BeginForm("CreateCommunication", "Communications", new { CommunContext = ViewBag.CommContext, CommunId = ViewBag.CommId }, FormMethod.Post, new { @class = "createCommunicationForm"}))
  {
  //some code
  }
  </code></pre>
  
  <p>My MVC controller:</p>
  
  <pre><code>        public ActionResult CreateCommunication(string CommunId, string CommunContext, string[] PartyTypes, [ModelBinder(typeof(DevExpress.Web.Mvc.DevExpressEditorsBinder))]CommunicationModel item)
      {
          var files = Request.Files;
      }
  </code></pre>
  
  <p>So files and model are here, but not these other variables, maybe is there a simple solution how can I obtain them ? Thanks for any help and Your time.</p>