When I have a form element in the view: create.cshtml
create.cshtml
<form method="get"> ...whatever </form>
and we have a model in the code-behind file: create.cshtml.cs
create.cshtml.cs
public class CreateModel : PageModel { //...whatever public void OnGet() { } }
the form will call OnGet(). I understand that this is a standard and is followed in most frameworks, but that means it must be defined somewhere in .NET. What file defines this standard and if we can, can we change it (for understanding's sake)?
OnGet()
1.4m articles
1.4m replys
5 comments
57.0k users