简体   繁体   中英

Reusable Cascading DropDown List in .Net Core MVC

I have a cascading drop-down list which is used in most of my views.

Are there other methods except for creating a partial view in .Net Core with MVC with which I can reuse them in all my views?

TIA.

In asp.net core , you can use View components .

View components are similar to partial views, but they're much more powerful ,it can inlcudes business logic ,the same separation-of-concerns and testability benefits found between a controller and view , and are intended anywhere you have reusable rendering logic that's too complex for a partial view .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM