Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Can't get OnPost to work with Razor Pages

$
0
0

I'm trying to get a form submit to work with Razor Pages. It never hits my OnPost() routine. I stubbed in an OnGet() method temporarily and it executed. Stumped as to why the OnPost doesn't work. Code is at https://github.com/mike-ward/SampleCore. REAME.md has build instructions. It's a very basic project so not much is required.

  • Set a breakpoint at OnPost in /Pages/Account/User/login.cshtml.cs
  • Click the login link and fill out the form.
  • Press login button

I've tried several different signatures for OnPost without luck. I have to be missing obvious is all I can figure.


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>