title: serialize() is giving empty value in mvc
body: <p>I have tried several ways to get the serialize data from serialize() method in controller but in controller all the inputs are showing null values.</p>
  
  <p>I have used razor views so that id and name will appear automatically.</p>
  
  <p>Here is my javascript code..</p>
  
  <pre><code>$("#save-btn").click(function () {
          debugger;
          console.log($("supplierForm").serialize());
              $.ajax({
                  type: "POST",
                  url: "/Home/AddRecords",
                  cache: false,
                  data: $("#FrmGrid_rowed3").serialize(),
                  success: function (response) {
                      if (response.Success)
                      {                     
                          $('#formdivId').css('display', 'none');
                          $('#footerId').css('margin-top', 205);
                          $('#fbox_rowed3_reset').css('height', 28);
                          $('#fbox_rowed3_search').css('height', 30);
                          LoadJqGrid();
                          $('.spanCss').text("");
                          $('.inputCss').val("");
                          $('.ui-jqgrid-headlink.ui-icon.ui-icon-circle-triangle-n').hide();
                          alert(response.Response);
                      }
                      else
                      {
                          $('alert-msg').text(response.Response);
                      }
                  }
              });
            //}
          });
  </code></pre>
  
  <p>And this is my controller code...</p>
  
  <pre><code> [HttpPost]
         [ValidateCustomAntiForgeryToken]
          public JsonResult AddRecords(SupplierModel supplier)
          {
              if (ModelState.IsValid)
              {
                  Repository repo = new Repository();
                  string result = repo.AddorEditData(supplier);
                  if (result != "")
                  {
                      return Json(new { Success = true, Response = result });
                  }
                  return Json(new { Success = true, Response = result });
              }           
              else
              {
                  return Json(new {Success = false , Response = "Please Fill All the Fields"});
              }
  
          }
  </code></pre>
  
  <p>And this is the code for razor view</p>
  
  <pre><code> @using (Html.BeginForm("AddRecords","Home",FormMethod.Post, new { @id = "FrmGrid_rowed3", @class = "form-horizontal", style = "padding-top:25px" }))
                    {
                        @*&lt;form id="FrmGrid_rowed3" name="supplierForm" class="form-horizontal" style = "padding-top:25px"&gt;*@
                         @Html.AntiForgeryToken()
  
                                  &lt;div class="row rowCss"&gt;
                                    &lt;div class="col-sm-6" &gt;
                                       &lt;div class="form-group"&gt;              
                                          &lt;div class="col-sm-2 labelCss" style="margin-left: 25px;"&gt;
                                               &lt;label class="control-label"&gt;Company Name:&lt;/label&gt;
                                          &lt;/div&gt;
                                          &lt;div class="col-sm-4 inputCss" style="height:40px"&gt;
                                               @Html.HiddenFor(model=&gt;model.supplierID)
                                               @Html.TextBoxFor(model =&gt; model.companyName, new { @class="form-control inputCss" , placeholder = "Enter Company Name" }) 
                                               &lt;div style="width:254px"&gt;  
                                                   @Html.ValidationMessageFor(model=&gt;model.companyName,"",new{@class="spanCss" , @id="compName"}) 
                                               &lt;/div&gt;
                                          &lt;/div&gt;     
                                        &lt;/div&gt;           
                                   &lt;/div&gt;
  
  
                                   &lt;div class="col-sm-6 "&gt; 
                                        &lt;div class="form-group"&gt;                 
                                          &lt;div class="col-sm-2 labelCss" style="margin-left:-58px"&gt; 
                                               &lt;label class="control-label"&gt;Contact Title:&lt;/label&gt;
                                           &lt;/div&gt;
                                           &lt;div class="col-sm-4 inputCss" style="height:40px"&gt;
                                               @Html.TextBoxFor(model =&gt; model.contactTitle, new { @class="form-control inputCss" , placeholder = "Enter Contact Name" })                          &lt;span class="spanCss"&gt;&lt;/span&gt;
                                               &lt;div style="width:254px"&gt;  
                                                   @Html.ValidationMessageFor(model=&gt;model.contactTitle,"",new{@class="spanCss" , @id="contTitle"}) 
                                               &lt;/div&gt;
                                           &lt;/div&gt; 
                                        &lt;/div&gt;              
                                   &lt;/div&gt;
                                &lt;/div&gt;
                              &lt;div class="row rowCss"&gt;
                                   &lt;div class="col-sm-6" style="margin-right:1px"&gt;
                                       &lt;div class="form-group"&gt;              
                                          &lt;div class="col-sm-2 labelCss"&gt;
                                               &lt;label class="control-label"&gt;Contact Name:&lt;/label&gt;
                                          &lt;/div&gt;
                                          &lt;div class="col-sm-4 inputCss" style="height:40px"&gt; 
                                               @Html.TextBoxFor(model =&gt; model.contactName, new { @class="form-control inputCss" , placeholder = "Enter Contact Title" })
                                               &lt;div style="width:254px"&gt;  
                                                   @Html.ValidationMessageFor(model=&gt;model.contactName,"",new{@class="spanCss" , @id="contName"}) 
                                               &lt;/div&gt; 
                                          &lt;/div&gt;     
                                        &lt;/div&gt;           
                                   &lt;/div&gt;
  
  
                                   &lt;div class="col-sm-6" style="margin-right:-1px"&gt; 
                                        &lt;div class="form-group"&gt;                 
                                          &lt;div class="col-sm-2 labelCss" style="margin-left:-57px"&gt; 
                                               &lt;label class="control-label"&gt;Address:&lt;/label&gt;
                                           &lt;/div&gt;
                                           &lt;div class="col-sm-4 inputCss" style="margin-top:-5px" style="height:40px"&gt;
                                                 @Html.TextAreaFor(model =&gt; model.address,2,5, new { @class="form-control inputCss" , placeholder = "Enter Address",style="height:45px" })
                                               &lt;div style="width:254px"&gt;  
                                                   @Html.ValidationMessageFor(model=&gt;model.address,"",new{@class="spanCss" , @id="Address"}) 
                                               &lt;/div&gt;
                                          &lt;/div&gt; 
                                         &lt;/div&gt;              
                                   &lt;/div&gt;
                                 &lt;/div&gt;
                              &lt;div class="row rowCss"&gt;
                                   &lt;div class="col-sm-6"&gt;
                                       &lt;div class="form-group"&gt;              
                                          &lt;div class="col-sm-2 labelCss"&gt;
                                               &lt;label class="control-label"&gt;City:&lt;/label&gt;
                                          &lt;/div&gt;
                                          &lt;div class="col-sm-4 inputCss" style="height:40px"&gt;
                                                 @Html.TextBoxFor(model =&gt; model.city, new { @class="form-control inputCss" , placeholder = "Enter City Name" })
                                                &lt;div style="width:254px"&gt;  
                                                   @Html.ValidationMessageFor(model=&gt;model.city,"",new{@class="spanCss" , @id="City"}) 
                                               &lt;/div&gt;
                                          &lt;/div&gt;     
                                        &lt;/div&gt;           
                                   &lt;/div&gt;
  
                                   &lt;div class="col-sm-6"&gt; 
                                        &lt;div class="form-group"&gt;                 
                                          &lt;div class="col-sm-2 labelCss" style="margin-left:-56px"&gt; 
                                               &lt;label class="control-label"&gt;Region:&lt;/label&gt;
                                           &lt;/div&gt;
                                           &lt;div class="col-sm-4 inputCss" style="height:40px"&gt;
                                                  @Html.TextBoxFor(model =&gt; model.region, new { @class="form-control inputCss" , placeholder = "Enter Region" })
                                               &lt;div style="width:254px"&gt;  
                                                  @Html.ValidationMessageFor(model=&gt;model.region,"",new{@class="spanCss" , @id="Region"}) 
                                               &lt;/div&gt;
                                          &lt;/div&gt; 
                                         &lt;/div&gt;              
                                   &lt;/div&gt;
                                  &lt;/div&gt;
                              &lt;div class="row rowCss"&gt;
                                   &lt;div class="col-sm-6" style="margin-right:1px"&gt;
                                       &lt;div class="form-group"&gt;              
                                          &lt;div class="col-sm-2 labelCss"&gt;
                                               &lt;label class="control-label"&gt;Postal Code:&lt;/label&gt;
                                          &lt;/div&gt;
                                          &lt;div class="col-sm-4 inputCss" style="height:40px"&gt;
                                                 @Html.TextBoxFor(model =&gt; model.postalCode, new { @class="form-control inputCss" , placeholder = "Enter Postal Code" })
                                              &lt;div style="width:254px"&gt;
                                                  @Html.ValidationMessageFor(model=&gt;model.postalCode,"",new{@class="spanCss" , @id="PostalCode" ,style="width:200px" }) 
                                              &lt;/div&gt;   
                                          &lt;/div&gt;     
                                        &lt;/div&gt;           
                                     &lt;/div&gt;
  
                                    &lt;div class="col-sm-6" style="margin-right:-1px"&gt; 
                                        &lt;div class="form-group" &gt;                 
                                          &lt;div class="col-sm-2 labelCss" style="margin-left:-55px"&gt; 
                                               &lt;label class="control-label"&gt;Country:&lt;/label&gt;
                                           &lt;/div&gt;
                                           &lt;div class="col-sm-4 inputCss" style="height:40px"&gt;
                                                 @Html.TextBoxFor(model =&gt; model.country, new { @class="form-control inputCss" , placeholder = "Enter Country" ,style="width:280px" })
                                                 &lt;div style="width:254px"&gt;  
                                                   @Html.ValidationMessageFor(model=&gt;model.country,"",new{@class="spanCss" , @id="Country"}) 
                                               &lt;/div&gt;
                                          &lt;/div&gt; 
                                         &lt;/div&gt;              
                                   &lt;/div&gt;
                               &lt;/div&gt;
                              &lt;div class="row rowCss"&gt;
                                   &lt;div class="col-sm-6"&gt;
                                       &lt;div class="form-group"&gt;              
                                          &lt;div class="col-sm-2 labelCss"&gt;
                                               &lt;label class="control-label"&gt;Phone:&lt;/label&gt;
                                          &lt;/div&gt;
                                          &lt;div class="col-sm-4 inputCss" style="height:40px"&gt;
                                              @Html.TextBoxFor(model =&gt; model.phone, new { @class="form-control inputCss" , placeholder = "Enter Phone Number" })
                                             &lt;div style="width:254px"&gt;  
                                                   @Html.ValidationMessageFor(model=&gt;model.phone,"",new{@class="spanCss" , @id="Phone"}) 
                                               &lt;/div&gt;
                                          &lt;/div&gt;     
                                        &lt;/div&gt;           
                                     &lt;/div&gt;
  
                                    &lt;div class="col-sm-6" style="margin-left:-54px"&gt; 
                                        &lt;div class="form-group"&gt;                 
                                          &lt;div class="col-sm-2 labelCss" style="margin-left:0px" &gt; 
                                               &lt;label class="control-label"&gt;Fax:&lt;/label&gt;
                                           &lt;/div&gt;
                                           &lt;div class="col-sm-4 inputCss" style="height:40px"&gt;
                                                   @Html.TextBoxFor(model =&gt; model.fax, new { @class="form-control inputCss" , placeholder = "Enter Fax Number" })
                                                   &lt;div style="width:254px"&gt;  
                                                   @Html.ValidationMessageFor(model=&gt;model.fax,"",new{@class="spanCss" , @id="Fax"}) 
                                               &lt;/div&gt;
                                          &lt;/div&gt; 
                                         &lt;/div&gt;              
                                   &lt;/div&gt;
                               &lt;/div&gt;
                              &lt;div class="row rowCss" style="height:24px"&gt;
                                  &lt;center&gt;
                                      &lt;input id="save-btn" type="button"  value="Submit" /&gt;
                                      &lt;input type="button" value="Cancel" id="cData"  /&gt;
                                  &lt;/center&gt;
                              &lt;/div&gt;
                    }
  </code></pre>
  
  <p>Please suggest any solution as i have tried all the ways to get that data in my cotroller.</p>