Click here to Skip to main content
15,886,689 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Its been a while since I placed a question here.

I am trying to select from a dropdown of rows on a .net core form that draws its data from my route table, showing route id and route name.

All the examples I have are based on lists of single values such as strings.

There are some heavily involved examples online using tag helpers.

Has anyone got a clear example?

What I have tried:

I am using view components following Adam Freeman's examples in his book on .NET Core from Apress. The select construct that works as illustrated with single field lists e.g. of strings is not available when the list is based on a complex type.
Posted
Comments
dan!sh 19-Apr-18 2:20am    
I am not really sure what you are trying to load into the dropdown. Are you trying to load all registered routes?
Ger Hayden 19-Apr-18 3:44am    
Drop downs are bus routes, start stage, end stage and ticket type. Most passengers are expected to start from route and proceed logically but I want to allow passengers who are served by differnt routes to start with the ticket type because not all tickets will be available on all routes. MVC Routes and Bus Routes are bound to get confusing.
dan!sh 19-Apr-18 4:08am    
Sorry this still does not help. You might want to dumb down your business requirements for us. Maybe something like, I have an object with multiple properties and I want to display few of them in a dropdown or something like that.
Kornfeld Eliyahu Peter 19-Apr-18 4:47am    
Do you mean a dropdown that instead of returning a single value for each selection returns a multiple values? Like you select a date and you get date, time and location back?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900