I have a dynamic form that allows me to dynamically add many fields,
I know how to get the value of a single field in aspnet using: Request.Form ["myField"], but here I have more fields and I donβt know the count of these fields, since they are dynamic
the name of the fields is "orders []"
Example:
<form> <input type="text" name="orders[]" value="order1" /> <input type="text" name="orders[]" value="order2" /> <input type="text" name="orders[]" value="order3" /> </form>
In php, I get the values ββas an array, referring to $_POST['orders'] ;
Example:
$orders = $_POST['orders']; foreach($orders as $order){
how to do it in c #?
amd
source share