2021年3月30日星期二

Razor Pages on Asp.Net Core - Added Razor Page but cant get page to show

I am still figuring a lot out on Razor Pages for .Net Core and am a little stuck on something. I have added a new Razor Page:

enter image description here

Which lives in the Pages folder:

enter image description here

On an existing page I have added an Input and a button to initiate a Search:

enter image description here

Which onClick calls the following Javascript function:

enter image description here

In the below screenshot, OnGetAsync method is hit when I put a breakpoint in, and can see the input value SearchValue is populated:

enter image description here

However I would expect the browser to then display the Search.cshtml page. Instead the browser just remains on the current index.cshtml page.

Am I missing something or am I just doing this incorrectly?

https://stackoverflow.com/questions/66875764/razor-pages-on-asp-net-core-added-razor-page-but-cant-get-page-to-show March 31, 2021 at 01:33AM

没有评论:

发表评论