Hi,
I want to Display Username instead of Userid but it should take the Userid Value
I have 2 tables : AspNetUsers and AspNetUserRoles
- ViewData["UserId"] = new SelectList(_context.AspNetUsers, "Id", "Id");
- class="form-group">
- ="UserId" class="control-label">
- ="UserId" class="form-control" asp-items="ViewBag.UserId">

Harsh ShahRank #1,322 · 1.3K reputationPosted Mar 31, 2020, 9:04 PM EDT
Vinay SinghRank #604 · 4K reputationPosted Mar 31, 2020, 9:06 PM EDT