Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

168
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda