Correct me if Im wrong, but since Razor Pages and their handler methods generally return a viewmodel, the whole page needs to refresh to handle this. So there are different ways of setting up a razor page, much like there are with a MVC application. Some
of them are
- Handler methods. Each method returns a model
- Named handler methods. Each handler method is referenced via seperate form tag from within the razor page
- Partial pages
- Partial pages with Ajax, which lets you update sections of a page without refreshing the whole page
- Using a separate web api combined with jQuery to fetch data and update sections of a page.
That about sum it up? Please correct where Im wrong.
↧
Trying to get my head around different ways of using Razor Pages
↧