I am using .net core 3.5 and razor pages. I have a file upload control that is calling OnPost even when the control explicitly says to call a different method name.
@(Html.Kendo().Upload()
.Name("files")
.Multiple(false)
.Async(a => a
.Save("Async_Save", "New", new { Question = DebtorDropBox.Web.UI.Code.Question.DriversLicense })
.AutoUpload(true)
)
.Events(e => e
.Success("onSuccess")
.Upload("onUpload")
.Error("onError")
)
.Validation(validation => validation.AllowedExtensions(new string[] { ".jpg" }))
.Validation(validation => validation.MaxFileSize(4000000))
)
for testing purposes I have added the following three methods to my page and no matter what It keeps calling OnPost. Is there something I should be doing?
public async Task<ActionResult> Async_Save(IEnumerable<IFormFile> files, Question question)
{
return Page();
}
public async Task<ActionResult> OnPostAsync_Save(IEnumerable<IFormFile> files, Question question)
{
return Page();
}
public async Task<ActionResult> OnPost(IEnumerable<IFormFile> files, Question question)
{
return Page();
}