How do I accept an array as an ASP.NET MVC controller action parameter?

后端 未结 5 860
遥遥无期
遥遥无期 2020-11-27 13:06

I have an ASP.net MVC controller called Designs that has an action with the following signature:

public ActionResult Multiple(int[] ids)
         


        
5条回答
  •  暖寄归人
    2020-11-27 13:50

    You can also use this URL format, and ASP.NET MVC will do everything for you. But, remember to apply URL encoding.

    ?param1[0]=3344¶m1[1]=2222
    

提交回复
热议问题