I know in PHP we can easily create something like this to handle HTML array elements:
<input name="test[0]" value="1" />
<input name="test[1]" value="2" />
<input name="test[2]" value="3" />
Then in code I can access this as an array:
$arrElements = $_POST['test'];
echo $arrElements[0]; // prints: 1
I have been trying to do the same in ASP.NET (Web Applications). But unfortunately this (also) doesn't work that easy.
So if i use the same HTML as above, i then tried to do the following in my CodeBehind:
var test = Request.Form.GetValues("test");
But this results in test being null. Is there anyway to handle HTML array elements like i can with PHP?