Home / Companies / Twilio / Blog / Post Details
Content Deep Dive

Building Hierarchical Dropdown Lists in ASP.NET Core 3.1 Razor Pages with View Models and Ajax

Blog post from Twilio

Post Details
Company
Date Published
Author
AJ Saulsberry
Word Count
7,739
Company Posts That Month
56
Language
English
Hacker News Points
-
Summary

In this post, you learned how to use ASP.NET Core Razor Pages, view models, repositories, and Ajax to implement hierarchical dropdown lists on a webpage. You saw how to connect data repositories to the database by injecting a DbContext implementation into your Razor Pages page models, and how to build an Ajax query to get a JSON object from a Razor Pages action method. You also learned how to use HTML Helpers to create input form controls and set the HTML attributes of those controls, and how to configure an ASP.NET Core application to use an antiforgery token in an HTTP POST request header. The post provided a number of potential enhancements that can expand your knowledge of ASP.NET Core development, including implementing CRUD functionality for Countries, Regions, and Customers, adding asynchronous functionality to the repositories and page model action methods, and using interfaces and factory classes to reduce class coupling.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
Secrets Management 2 355 41 21 +92%