As they are, I have a list of diseases that is shown in my DropDownList and when selecting it, it is loaded in the textarea, so far without problems; but if I select another disease again, it is replaced in the Textarea and I want the new selected disease to be added, I hope you can help me
$(document).on('change', '#idenfermedad', function (event) {
$('#diagnos').val($("#idenfermedad option:selected").text());
});
<div class="form-group col-md-6">
<label asp-for="diagnostico" class="control-label"></label>
@Html.DropDownList("idenfermedad", listaEnfermedad, new { @class = "form form control" })
<textarea asp-for="diagnostico" class="form-control col-md-12" rows="7" id="diagnos"></textarea>
</div>
Try this:
and in the empty space that I have separated, put whatever you want in its place, perhaps one
\n
so that you skip the line.