menna samitr

menna samitr

  • NA
  • 240
  • 1.6k

jquery Repeater Returns Null to MVC Controller on Submitting

Aug 7 2020 4:18 AM
I have a problem when I post Form all data returns null value to controller
I need Steps To Solve this problem
this is my code
 
 
  1. <link href="~/assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />  
  2. <link href="~/assets/css/jquery-ui.min.css" rel="stylesheet">  
  3. <link href="~/assets/css/icons.min.css" rel="stylesheet" type="text/css" />  
  4. <link href="~/assets/css/metisMenu.min.css" rel="stylesheet" type="text/css" />  
  5. <link href="~/plugins/daterangepicker/daterangepicker.css" rel="stylesheet" type="text/css" />  
  6. <link href="~/assets/css/app.min.css" rel="stylesheet" type="text/css" />  
  7. <h2>test</h2>  
  8.   
  9.   
  10. <div class="row">  
  11.     <div class="col-12">  
  12.         <div class="card">  
  13.             <div class="card-body">  
  14.                 @using (Html.BeginForm(actionName: "uu",  
  15.                     controllerName: "Employee",  
  16.                     method: FormMethod.Post,  
  17.                     htmlAttributes: new { enctype = "multipart/form-data", @id = "form-horizontal", @class = "form-horizontal form-wizard-wrapper text-right form-parsley" }  
  18.   
  19.   
  20.                    ))  
  21.                 {  
  22.                     @Html.AntiForgeryToken()  
  23.                     <fieldset>  
  24.                         <div class="repeater-default">  
  25.                             <div data-repeater-list="car">  
  26.                                 <div data-repeater-item="">  
  27.                                     <div class="form-group row d-flex align-items-end">  
  28.                                         <div class="col-sm-4">  
  29.                                             <label class="control-label">Imprest</label>  
  30.                                             @Html.DropDownList("Imprest", new SelectList(ViewBag.Imprests as System.Collections.IEnumerable, "id""ImprestName"),  
  31.                      "--Choose--", new { @class = "form-control drop", @id = "dropImp" })  
  32.                                         </div><!--end col-->  
  33.                                         <div class="col-sm-4">  
  34.                                             <label class="control-label">Imprest Type</label>  
  35.                                             @Html.TextBox("ImprestType", null, new { @Type = "text", @class = "form-control", @autocomplete = "off", @id = "txtimp" })  
  36.                                         </div><!--end col-->  
  37.                                         <div class="col-sm-1">  
  38.                                             <span data-repeater-delete="" class="btn btn-danger btn-sm">  
  39.                                                 <span class="far fa-trash-alt mr-1"></span> Delete  
  40.                                             </span>  
  41.                                         </div><!--end col-->  
  42.                                     </div><!--end row-->  
  43.                                 </div><!--end /div-->  
  44.                             </div><!--end repet-list-->  
  45.                             <div class="form-group mb-0 row">  
  46.                                 <div class="col-sm-12">  
  47.                                     <span data-repeater-create="" class="btn btn-secondary btn-sm">  
  48.                                         <span class="fas fa-plus"></span> Add  
  49.                                     </span>  
  50.                                     <input type="submit" value="Submit" class="btn btn-primary btn-sm">  
  51.                                 </div><!--end col-->  
  52.                             </div><!--end row-->  
  53.                         </div> <!--end repeter-->  
  54.                     </fieldset><!--end fieldset-->  
  55.                 }  
  56.                 </div><!--end card-body-->  
  57.         </div><!--end card-->  
  58.     </div> <!-- end col -->      
  59. </div>  
  60.   
  61.   
  62.   
  63.   
  64.   
  65.   
  66.   
  67.   
  68.   
  69.   
  70. <script src="~/assets/js/jquery.min.js"></script>  
  71. <script src="~/assets/js/bootstrap.bundle.min.js"></script>  
  72. <script src="~/assets/js/metismenu.min.js"></script>  
  73. <script src="~/assets/js/waves.js"></script>  
  74. <script src="~/assets/js/feather.min.js"></script>  
  75. <script src="~/assets/js/simplebar.min.js"></script>  
  76. <script src="~/assets/js/jquery-ui.min.js"></script>  
  77. <script src="~/assets/js/moment.js"></script>  
  78. <script src="~/plugins/daterangepicker/daterangepicker.js"></script>  
  79.   
  80.   
  81. <script src="~/plugins/repeater/jquery.repeater.min.js"></script>  
  82. <script src="~/assets/pages/jquery.form-repeater.js"></script>  
  83.   
  84.   
  85. <!-- App js -->  
  86. <script src="~/assets/js/app.js"></script>  

Answers (3)