in asp.net mvc, how can I pass an array of integers as a parameter

后端 未结 2 1597
无人及你
无人及你 2021-01-12 14:21

i have a controller function that previously had integers as each section in the URL (which i setup in the routing file) but now one of the parameters needs to be an array o

2条回答
  •  天涯浪人
    2021-01-12 15:02

    Here is an example from jquery's API for $.post()

    Example: pass arrays of data to the server (while still ignoring the return results).

    $.post("test.php", { 'choices[]': ["Jon", "Susan"] }, function() { //do stuff });
    

提交回复
热议问题