3

Someone please give an example of cascading dropdown list in Razor Pages without MVC. I am using Entity Framework,I have a Model and in Pages a .cshtml page and a corresponding .cshtml.cs page, there is no separate view and controller.

I have searched a lot on the web for this but all of the examples involved are showing MVC examples.

A list of countries has to be fetched from the database and based on the country the below State dropdown should populate from the db.

I am stuck with this since long time.

  • You can apply the same code from MVC that you found to razor pages. if you look into the Microsoft docs there is a movie app that creates a search box and you can use the same technique to solve your problem. – causita Jun 08 '18 at 18:27
  • Hi Causita, I need a cascading dropdown(loading one dropdown depending on other dropdown selected value) but couldn't find a suitable solution, tried with the mvc solution which didn't work. – nishanth gmk Jun 11 '18 at 06:55
  • Post the code and what you have tried and we can help you. – causita Jun 12 '18 at 12:57

0 Answers0