From 0f93c1119391af5cbd7b1799a445624e430d0bab Mon Sep 17 00:00:00 2001 From: Rick Anderson <3605364+Rick-Anderson@users.noreply.github.com> Date: Thu, 2 Dec 2021 14:45:26 -1000 Subject: [PATCH] Update aspnetcore/mvc/models/model-binding.md --- aspnetcore/mvc/models/model-binding.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/aspnetcore/mvc/models/model-binding.md b/aspnetcore/mvc/models/model-binding.md index d7448bf0b7..b265b1c389 100644 --- a/aspnetcore/mvc/models/model-binding.md +++ b/aspnetcore/mvc/models/model-binding.md @@ -342,7 +342,10 @@ For targets that are collections of simple types, model binding looks for matche [a]=1050&[b]=2000&index=a&index=b ``` - + Avoid binding a parameter or a property named `index` or `Index` if it is adjacent to a collection value. Model binding attempts to use `index` as the index for the collection which might result in incorrect binding. For example, consider the following action: + + ```csharp + public IActionResult Post(string index, List products) * The following format is supported only in form data: ```