I have dynamic inputs
The code works properly, but the input file type passed null
the AttachmentsDto ,,,
JavaScript
$("#addRow").click(function ()
{
var rowCount = parseInt($("#total").val());
rowCount++;
$("#total").val(rowCount);
console.log(rowCount);
var html = '';
html += '';
html += '';
html += '';
html += '';
html += '';
//add more inputs here...
html += 'Delete';
html += '
';
$('#newRow').append(html);
});
$(document).on('click', '#removeRow', function ()
{
var rowCount = parseInt($("#total").val());
rowCount--;
$("#total").val(rowCount);
$(this).closest('#inputRow').remove();
});C#
public class AttachmentsDto
{
public string Name { get; set; }
public int AttachType { get; set; }
public List 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;
}
Answers
Know the answer? Post it. Somebody with the same question will find it here.