Hi, I have a grid on my razor page but the browser is giving me a 404 error saying that the specified method (/Tournaments/Organizer/Details?handler=ReadTournamentTeams) could not be found.
My "DataSource" portion of grid (.cshtml)
.DataSource(ds => ds.Ajax()
.Read(r => r.Url("/Tournaments/Organizer/Details?handler=ReadTournamentTeams"))
.Model(m =>
{
m.Id(id => id.TeamID);
})
.PageSize(10)
)
My method in .cshtml.cs:
public JsonResult OnPostReadTournamentTeams([DataSourceRequest] DataSourceRequest request)
{
var tournamentTeams = db.Tournament_X_Teams.Where(x => x.Active == true).ToList();
return new JsonResult(tournamentTeams.ToDataSourceResult(request));
}
What can the issue be?
Kendo Version: 2022.2.621
Visual Studio: VS 2022, v17.3.6