Blog

Oct 2025

Using Razor Components in an ASP.NET Core MVC Application

Author Lee Timmins Date 2nd Oct 25 Comments Comments

In an ASP.NET Core MVC application, you can not only render Razor components within views using the component tag helper, but also return Razor components directly from MVC actions.

In this post, we’ll walk through an example of returning a Razor component from an MVC action and address the issues that come up along the way.

Read More...


Automatically Re-Executing Scripts in ASP.NET Core MVC with Blazor Enhanced Navigation

Author Lee Timmins Date 1st Oct 25 Comments Comments

In my previous post on executing scripts in an ASP.NET Core MVC app with Blazor enhanced navigation, you had to use a <page-script> tag to define your custom scripts. But what if you don’t want to manually convert every script on your site?

Here’s a way to automatically handle this by using a MutationObserver and reloading <script> tags whenever they appear in the DOM.

Read More...