Let me start by saying that I love the combination of Htmx and ASP.NET Core, and it is a pairing that any .NET developer should consider, whether maintaining an existing application or building a new one. It’s very cool. I was recently talking about revisiting the
hx-trigger
and
HX-Trigger
header technique with ASP.NET Core on Mastodon with Illya Busigin, and they mentioned they use the same method to update the avatar image when a user updates their profile. So, I thought I’d try and see how to implement it myself.
In this post, we’ll see how to use the
HX-Trigger
facility in Htmx to update existing UI elements on a rendered HTML page.