title: getting null in controller even thought it contains data
body: <p>I have a json result in my view,which I need to send it back to controller,to convert it to .CSV file,but I get null in controller even thought its contain data,here is my view the "result" contains data but in my controller I get it null,any help will be highly appreciated </p>
  
  <pre><code>  $.ajax({
  
          dataType: "json",
          type: "POST",
          url: "@Url.Action("CreateCSVFile", "Turbine")",
          contentType: "application/json; charset=utf-8",
          data: JSON.stringify({ "result": result }),
          success: function (result) {
                          }
                          })
  </code></pre>
  
  <p>and here is my controller which I get NULL:</p>
  
  <pre><code>  public void CreateCSVFile(string result)
      {
  
          //XmlNode xml = JSON  JSON.DeserializeXmlNode("{records:{record:" + json + "}}"); 
  
          DataTable dt = JsonConvert.DeserializeObject&lt;DataTable&gt;(result);
          string strFilePath = @"C:\myCSVfile.csv";
          // Create the CSV file to which grid data will be exported.
  
          StreamWriter sw = new StreamWriter(strFilePath, false);
  
          //First we will write the headers.
  
          int iColCount = dt.Columns.Count;
  
          for (int i = 0; i &lt; iColCount; i++)
          {
              sw.Write(dt.Columns[i]);
              if (i &lt; iColCount - 1)
              {
                  sw.Write(",");
              }
          }
          sw.Write(sw.NewLine);
  
          // Now write all the rows.
  
          foreach (DataRow dr in dt.Rows)
          {
              for (int i = 0; i &lt; iColCount; i++)
              {
                  if (!Convert.IsDBNull(dr[i]))
                  {
                      sw.Write(dr[i].ToString());
                  }
                  if (i &lt; iColCount - 1)
                  {
                      sw.Write(",");
                  }
              }
              sw.Write(sw.NewLine);
          }
          sw.Close();
      }
  </code></pre>