Archive From September 2018

Customising Routing Conventions In Razor Pages

26 September 2018 07:39

ASP.NET Core Razor Pages

At its heart, the Razor Pages routing story is a simple one. It uses a convention of mapping URLs to files on disk. There are ways to customise how pages are found on an individual basis, but what if you want to change the default convention in its entirety? There is also a way to do that. And it's quite simple, as this article will demonstrate, using two real-world examples.

Click to read more about Customising Routing Conventions In Razor Pages ...

Using Unobtrusive Ajax In Razor Pages

17 September 2018 08:17

AJAX ASP.NET Core Razor Pages

There are a few demonstrations showing how to use the jQuery Unobtrusive AJAX library in ASP.NET Core, but existing examples tend to feature MVC applications. This article looks at how to use Unobtrusive AJAX in a Razor Pages setting, where it will help to remove a lot of the boilerplate associated with making AJAX requests.

Click to read more about Using Unobtrusive Ajax In Razor Pages ...

Partials and AJAX In Razor Pages

07 September 2018 15:57

AJAX ASP.NET Core Razor Pages

Updating portions of a page using AJAX and partial views is a routine task in ASP.NET MVC applications. The experience is little different in ASP.NET Core Razor Pages - not much, but enough to stump some people. Here is some advice on accomplishing this task, and a preview of some additional help coming in the near future.

Click to read more about Partials and AJAX In Razor Pages ...

Areas In Razor Pages

03 September 2018 08:01

ASP.NET Core Razor Pages

Support for Areas was added to Razor Pages with the release of ASP.NET Core 2.1. They have long been used in MVC applications as a way to separate logical chunks of large applications into semi-independent modules to facilitate team working etc. Here, I explore how to use areas in a Razor Pages application.

Click to read more about Areas In Razor Pages ...