Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

167
Views
Data entered in dynamic fields isnt saved in database

I have made a .NET MVC application where I need to send data from frontend to backend. I have created dynamic fields which get added when the user presses the button. But the input added in the dynamic fields is not saved to the database. My backend is on MVC .NET. I want to save the data entered in the dynamic fields.

Html Code:

<div class="form-group">
    <label class="col-md-4 control-label"> Phone Number :</label>
    <div class="col-md-8">
        <input type="text" class="form-control" id="inputLabel3" placeholder="PhnNumber" ng-model="UserContactVM.PhnNumber ">
    </div>
    <div ng-repeat="UserContactVM in inputs">
        <input type="text" ng-model="UserContactVM.v">
    </div>
    <button ng-click="add()">Add Input</button>
</div>

Javascript:

app.controller("UserController", function ($scope, $http) {
  $scope.btntext = "Save";
  $scope.inputs = [{ PhnNumber: "" }];
  ($scope.add = function () {
    var dataObj = { PhnNumber: "" };
    $scope.inputs.push(dataObj);
  }),
    ($scope.saveuser = function () {
      $scope.btntext = "Please Wait..";
      $http({
        method: "POST",
        url: "/User/Create",
        datatype: "json",
        data: JSON.stringify($scope.UserContactVM),
      }).then(
        function successCallback(response) {
          console.log();
        },
        function errorCallback(response) {}
      );
    });
});
about 4 years ago · Santiago Gelvez
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!