A brief discussion on drop-down list menus in .NET Framework and .NET Core 2021-11-03 No Comments Talking-about-the-drop-down-list-menu-in-.NET-Framework-and-.NET-Core When writing web pages, you often see drop-down menus used in many places on the page. websites, ticket sales websites, etc. Drop-down menus are usually used when selecting the quantity or the county or city of the shipping address.
Menu, and when we use the SMS system, we often use drop-down menus, and the menu content is usually not only numbers, but sometimes text content is also required. For example, when we want to query the details of the SMS, the query condition can select business data the SMS status. , such as success, failure, not yet sent, etc. At this time, we can first write these SMS statuses in an Enum, and then use EnumDropDownListFor in Html to implement the drop-down menu. Let's look at the .
NET Framework and Differences in code writing in .NET Core. Table of contents List drop-down menu in 1.NET Framework 2. List drop-down menu in NET Core 1 List drop-down menu in .NET Framework In the .NET Framework, generally if we want to use EnumDropDownListFor, we need to first create an Enum to implement each item included in the menu, for example, as shown in the following code: namespace WebApplication.Models.Enum { public enum FoodEnum , } } Then you need to add another Model: namespace WebApplication.