From 6f3fce8f706e9aa4e278b58e74b3e65c6c71e400 Mon Sep 17 00:00:00 2001 From: rameel Date: Mon, 26 Oct 2026 20:37:58 +0500 Subject: [PATCH] tag-helpers: generate HTMX request URLs from asp-* attributes HTMX 4 defines its own hx-action attribute for the request URL, so the URL Tag Helper turned native markup such as @@ -183,15 +183,16 @@ The URL attributes from the example above work with Razor Pages too: ```html ``` -The request method comes from `hx-get`, `hx-post`, `hx-put`, `hx-patch`, or `hx-delete`. -If you leave it out, `hx-get` is used. +Write one of `hx-get`, `hx-post`, `hx-put`, `hx-patch`, or `hx-delete` without a value to choose +the request method; the Tag Helper fills in its URL from the `asp-*` attributes. +Without such an attribute, no URL is generated. Other Tag Helpers build HTMX attributes that otherwise need hand-written JSON: diff --git a/docs/articles/antiforgery.md b/docs/articles/antiforgery.md index 26a150d..f123bec 100644 --- a/docs/articles/antiforgery.md +++ b/docs/articles/antiforgery.md @@ -76,8 +76,8 @@ For a Razor Page with a `Save` POST handler: ```razor