A set of technologies in the .NET Framework for building web applications and XML web services.
you use the async handler for the desired http verb. it is called before the processing of the razor template.
public async Task OnGetAsync()
{
}
public async Task OnPostAsync()
{
}
note: this is all covered in the documentation.