How to return a PartialView from Core 2 RazorPage ViewModel Handler
问题 In Asp.Net MVC, you can easily return a partial view by doing the following: return PartialView("ModelName", Model); How is this done on a RazorPage ViewModel Handler? 回答1: I figured this out. It is not nearly as straight forward as it is in MVC. You have to create an empty ViewDataDictionary() and then set its Model property to the partial's populated model. View Model / Handler public async Task<IActionResult> OnGetAsyncUpdateSearchResults(DateTime startDate, DateTime endDate, string