How to detect postback in Razor Page?
问题 I'm using a single razor page (cshtml) that has a form and @functions{} section to capture an OnPost() . All of that works fine. In the HTML section, I need to know when a post back has occurred and display a message. I'm not sure where or how that is done in a Razor Page. I've tried IsPost but that isn't available. I created a string property in the class and set a value on it in OnPost but once I'm in the view, the property is null . I assigned a value into ViewData["mystring"] but it is