The Error
POST to page returns:
404 Not FoundQuick Fix - 1 Min
1. Handler method must be public async Task<IActionResult> OnPostAsync(). 2. Form must have asp-page-handler="YourHandler". 3. Check @page "{handler?}" if using route.
Root Cause
Razor Pages matches handlers by naming convention. Method private or misnamed = 404.
No comments yet. Be the first to share your thoughts!