Duration 4800

Creating a form in Core MVC You need to know this shorts

1 261 watched
0
51
Published 18 May 2023

You can create a multi-select dropdown list in ASP.NET Core MVC or ASP.NET Core Razor Pages with just 2 small changes to your code? Let me show you how! First, create a dropdown list as usual. This dropdown list takes the data you want to show in your options in the form of a List SelectListItem It also captures the dropdown selected value in the form of a string. Now your dropdown is ready, but wait where’s the multi-select dropdown? Well, all you have to do now is to add multiple attributes to the Select List Element in your HTML and change the string to a string[] to capture multiple selections from your dropdown and you will get all the selected values back in your string[] Send this video to someone who is struggling to create dropdowns and I’ll see you in the next one! #programming #dev #dotnet 💖 Subscribe to show support: https://bit.ly/2FAgXzS ☕ Buy me a coffee: https://www.buymeacoffee.com/SameerSaini

Category

Show more

Comments - 1