Coming from PHP background, I often used this:
How to POST data as an indexed array of arrays (without specifying indexes)
This way I could have item id's in the post data as array keys. Loop through the array and insert into DB the id's using the keys.
Now I'm trying to achieve the same in C# but cannot find a way. I tried searching for answers but nothing seems to suggest C# solution:
Get posted value In C# ASP.NET
Submitting form elements with the same name
I can't even get to the POST part. C# complains about this already:
<asp:TextBox ID="txt[1][1]" runat="server" />
<asp:TextBox ID="txt[1][2]" runat="server" />
<asp:TextBox ID="txt[1][3]" runat="server" />
Parser Error Message: 'txt[1][1]' is not a valid identifier.
Is there a better way in C# for me to do this?