C#C
C#3y ago
G

✅ Razor pages, not reaching OnPost method

I have made a <form method="post"> and within it i have a <button type="submit" >.

when i click on the button while debugging, the cshtml.cs uses the OnGet method. I have tried to assign a named handler to the button and adding the suffix the the onPost method and that does not work. I've looked up others same issues and mine looks fine but i must be messing something else up.

Could I get a hand please, perhaps a look over?
Was this page helpful?