<form action="test.aspx" method="post">
<input type"text" name="test[0].myitem" value="computer" />
<input type"text" name="test[0].quantity" value="1" />
<input type"text" name="test[0].price" value="US$10.5" />
<input type"text" name="test[1].myitem" value="printer" />
<input type"text" name="test[1].quantity" value="1" />
<input type"text" name="test[1].price" value="US$15.5" />
</form>
this it html source, How can I get and use this post data in asp.net c#
Request.Form["test"]
andRequest.Form.getValues("test")
didn't work.Request.Form["test[0].myitem"]
not work also
Try this
string[] keys = Request.Form.AllKeys;
var value = "";
for (int i= 0; i < keys.Length; i++)
{
// here you get the name eg test[0].quantity
// keys[i];
// to get the value you use
value = Request.Form[keys[i]];
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With