I have this textarea that is not being populated. The viewbag is not empty because if I populate a textbox instead, the information in @ViewBag.JobsDetails.job_description shows. It just does not show in a textarea
<div class="col-lg-6 mb-4">
<label class="form-label" asp-for="job_description"></label>
<textarea class="form-control" asp-for="job_description">@ViewBag.JobsDetails.job_description</textarea>
</div>
From Textarea does not display value when it has an asp-for parameter we can see:
And below are two options you can refer:
Option 1.use
nameattribute notasp-forlike:Option 2.you can pass the model to the view like:
In Controller:
In the view:
result: