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

176
Views
JavaScript pasa el tipo de archivo de entrada nulo en ASP.NET Core

tengo entradas dinamicas

El código funciona correctamente, pero el tipo de archivo de entrada pasó nulo

los AdjuntosDto ,,,

 public class AttachmentsDto { public string Name { get; set; } public int AttachType { get; set; } public List<IFormFile> Photos { get; set; } public string? CreatedBy { get; set; } public string? ModifiedBy { get; set; } public DateTime CreatedOn { get; set; } public DateTime? ModifiedOn { get; set; } public bool IsDeleted { get; set; } = false; }

el archivo de entrada de fotos #Photos pasó nulo, aunque la entrada #Name pasa el valor

 <script> $("#addRow").click(function () { var rowCount = parseInt($("#total").val()); rowCount++; $("#total").val(rowCount); console.log(rowCount); var html = ''; html += '<div id="inputRow">'; html += '<input type="text" name="DynamicNoteList[' + (rowCount - 1) + '].Note" class="form-control " />'; html += '</br>'; html += '<input type="file" id="Photos" name="Attachments[' + (rowCount - 1) + '].Photos" multiple="multiple" class="form-control custom-file-input"/>'; html += '<input type="text" name="Attachments[' + (rowCount - 1) + '].Name" id="Name " class="form-control"/>'; //add more inputs here... html += '<button id="removeRow" type="button" class="btn btn-danger">Delete</button>'; html += '</div>'; $('#newRow').append(html); }); $(document).on('click', '#removeRow', function () { var rowCount = parseInt($("#total").val()); rowCount--; $("#total").val(rowCount); $(this).closest('#inputRow').remove(); }); </script>
about 4 years ago · Santiago Trujillo
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!