I am trying to understand what I think is a model binding problem in my ASP.NET Core project. I have the following 'Index' controller action:
[HttpGet]
public async Task<IActionResult> Index(SortFilterIndexOptions options) { ... }
The SortFilterIndexOptions are four members defined in the following class:
public class SortFilterIndexOptions
{
public int SelectedBirdId { get; set; }
public bool ShowAll { get; set; }
public bool ShowInTable { get; set; }
public int page { get; set; }
}
These enable the user to filter a paged index page. The bool members are linked to checkbox controls.
I have a fault if the 'ShowAll' bool member is changed to TRUE and then try to navigate to a different page. As the screenshot, below, shows the 'ShowAll' parameter part of the url then contains two bool values ('ShowAll=true, false'):
which of course results in a parse error ('FormatException: String was not recognized as a valid Boolean').
What's happening here? It only happens when the 'ShowAll' parameter is toggled to TRUE. Is it a routing problem because it does not follow the default route pattern? Or is it a problem with the ModelBinder? I am just trying to understand what is going on so I can take the right action. Any help would be appreciated...
Update
This is now issue #3246 ('ModelBinding error with boolean values') on the asp/Home GitHub repository (originally raised by me as issue #1711 on the dotnet/Core repository).

ShowAll=true,falseis not valid as a boolean. Should work with justShowAll=true