Rajesh Thampi

Rajesh Thampi

  • NA
  • 128
  • 5.4k

ASP.NET Core with ADO.NET | Dropdown lists for Create and Edit actions

Apr 15 2021 8:01 AM
Greeings
 
I am struggling with my 1st ASP.NET Core using ADO.NET (Cannot implement entity due to existing database design) & having a tough time understanding dropdown list binding with data from database. Almost all the examples are calling the llist population tied to Index action.
 
For my intended application, Index view will be a customer listing page, from which I need to "Edit" or "Delete" them. Once the Edit action chosen, I need to provide the user to change multiple customer details using dropdown lists, sometimes the proceeding dropdown referring the predessor. I've seen Microsoft documents recommending using asp-for and asp-items instead of HTML helpers & much of the examples I could see are using HTML helpers for dropdown lists.
 
I am using .Net Core 5.0 with Visual Studio 2019. If there are good samples, documents, kindly refer them to me. ??

Answers (2)