Skip to content

Instantly share code, notes, and snippets.

@pytlus93
Last active September 7, 2017 11:29
Show Gist options
  • Save pytlus93/1ac1f79aaf552b4f68d6bc28b8869ee6 to your computer and use it in GitHub Desktop.
Save pytlus93/1ac1f79aaf552b4f68d6bc28b8869ee6 to your computer and use it in GitHub Desktop.
MVC5 Post List with broken indexes (https://stackoverflow.com/a/8598287/5502597)
<input type="hidden" name="Items.Index" value="0" />
<input type="text" name="Items[0].Name" value="someValue1" />
<input type="hidden" name="Items.Index" value="1" />
<input type="text" name="Items[1].Name" value="someValue2" />
<input type="hidden" name="Items.Index" value="3" />
<input type="text" name="Items[3].Name" value="someValue3" />
<input type="hidden" name="Items.Index" value="4" />
<input type="text" name="Items[4].Name" value="someValue4" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment