Populating Multiple Identical Models with MVC

Derburry

New Member
I have a page where I have text boxes to fill in information for 10 players (Name, Character, Kills, Deaths, Assists), and once I click 'Save' on that page, I want to populate a player Model for each player, and then somehow access those players in the Postback action where I will be inserting that data into my database. How can I do this?I know I could name the text boxes:
  • Player1, Character1, Kills1...
  • Player2, Character2, Kills2...
  • etc...
and then have all of those fields in a PlayerList model, and then it would auto populate the PlayerList model with all of the player information, but that seems like its not a very good way of doing it. Let me know if you have any insight.Thanks
 
Back
Top