my model
public async Task<IActionResult> OnPostUploadAsync(IFormFile MyFiles)
{
int k = await Task.FromResult(0);
return Page();
}
my cshtml
<form method="post" enctype="multipart/form-data">
<input type="text" value="" asp-for="mytestmodel.Name"/>
<input type="file" value="" multiple name="MyFiles"/>
<input type="submit" value="Submit" />
</form>
When I replace the method signature from OnPageUploadAsync to OnPageAsync everything is working, but OnPageUploadAsync is not being called.
What is wrong with my code?