https://htmx.org logo
Join Discord
Powered by
# dotnet-htmx
  • r

    ripe-action-67367

    05/20/2023, 6:57 AM
    Dang, you are right
  • r

    ripe-action-67367

    05/20/2023, 6:57 AM
    I always forget
  • r

    ripe-action-67367

    05/20/2023, 6:57 AM
    Razor pages handler does not allow to have non post/get handlers
  • r

    ripe-action-67367

    05/20/2023, 6:57 AM
    you can't use delete with them
  • e

    elegant-raincoat-69176

    05/20/2023, 6:57 AM
    The problems might be the requirement for a form tag, so that the __RequestVerificationToken can be passed.
  • r

    ripe-action-67367

    05/20/2023, 6:58 AM
    I faced the same in the past
  • e

    elegant-raincoat-69176

    05/20/2023, 6:58 AM
    Damned annoying!
  • e

    elegant-raincoat-69176

    05/20/2023, 6:58 AM
    Do you remember what you did to resolve them? And thanks for the help so far.
  • r

    ripe-action-67367

    05/20/2023, 6:58 AM
    Yes
  • e

    elegant-raincoat-69176

    05/20/2023, 6:59 AM
    I swear in the future I'm going to find myself another .NET framework to use!
  • e

    elegant-raincoat-69176

    05/20/2023, 7:00 AM
    This stuff should be simple and straight-forward, but it never damn well is!
  • r

    ripe-action-67367

    05/20/2023, 7:00 AM
    rename your method to OnPostDelete and do
    hx-post="@Url.Page("PageName", "Delete", new {id="asdlfk"})"
  • e

    elegant-raincoat-69176

    05/20/2023, 7:00 AM
    Giving it a whack...
  • r

    ripe-action-67367

    05/20/2023, 7:01 AM
    For some reason MS decided that only allowing OnGet and OnPost is a good idea, as if corresponding browsers' restriction is the right way to do this
  • e

    elegant-raincoat-69176

    05/20/2023, 7:03 AM
    I know! I wish Microsoft would stop treating us like we're all children and just give us a fully usable framework that doesn't have arbitrary limitations dreamed up by some idiotic twat!
  • e

    elegant-raincoat-69176

    05/20/2023, 7:06 AM
    http://localhost:5189/OAN/Bookings/Sectors/DeleteSectorPassenger?id=0e354c45-8671-46a8-b229-01f084ec0fcb&handler=Delete
  • r

    ripe-action-67367

    05/20/2023, 7:06 AM
    yep
  • r

    ripe-action-67367

    05/20/2023, 7:06 AM
    that's named handlers for ya
  • e

    elegant-raincoat-69176

    05/20/2023, 7:06 AM
    So I get the point of the Delete now where it targets the particular handler.
  • e

    elegant-raincoat-69176

    05/20/2023, 7:06 AM
    However I'm still being 400'd
  • e

    elegant-raincoat-69176

    05/20/2023, 7:07 AM
    I should have used Python!
  • e

    elegant-raincoat-69176

    05/20/2023, 7:08 AM
    Or maybe F# with Falco or Clojure, or anything that is not ASP.NET!
  • e

    elegant-raincoat-69176

    05/20/2023, 7:21 AM
    I've just discovered that Falco has native HTMX support now!
  • e

    elegant-raincoat-69176

    05/20/2023, 7:22 AM
    I wonder how long it would take t rewrite the billion pages of stuff I have now in F#?
  • e

    elegant-raincoat-69176

    05/20/2023, 7:25 AM
    OK. Not quite native, https://github.com/dpraimeyuu/Falco.Htmx
  • r

    ripe-action-67367

    05/20/2023, 7:27 AM
    Nice
  • r

    ripe-action-67367

    05/20/2023, 7:27 AM
    Gotta check Falco out then
  • e

    elegant-raincoat-69176

    05/20/2023, 7:28 AM
    I've been admiring it from afar for about as long as Pim has published it, but I've yet to get around to be able to use it for anything.
  • e

    elegant-raincoat-69176

    05/20/2023, 8:26 AM
    Hey Renerick, I found a solution. Point at a controller rather than a page and just return blank, ala the HTMX example. It's not "entirely truthful" i.e. if something goes wrong, but it will do for now.
  • l

    late-king-98305

    05/26/2023, 2:42 AM
    If anyone pops in here looking for help with Giraffe.Htmx - be sure to @ me. I'm going to be traveling until mid-June, and probably won't be keeping up with Discord channels. I should be on from time to time, though, so the @s will help me find it when I am on. 🙂 Have fun!