help with 2d array form in asp.net mvc
http://www.plus2net.com/php_tutorial/array_checkbox.php
the link is my reference in PHP
i want to ask how can i archive the samething with 2d array of data in asp.net mvc. if posible please show me some example, i can't find any info. I remember that php did this very easy. or even in ruby on rails.
开发者_运维问答elementname[][]
thank you
If you have a bunch of checkboxes with the same name:
<input type="checkbox" name="box" value="Freddy" />
<input type="checkbox" name="box" value="Brian" />
<input type="checkbox" name="box" value="John" />
<input type="checkbox" name="box" value="Roger" />
You just do this to get the checked values:
string[] values = Request.QueryString.GetValues("box");
精彩评论