C# MVC 4: Passing JavaScript array in View to Controller

前端 未结 3 1840
南旧
南旧 2021-02-13 22:24

In MVC 4, how do you pass a JavaScript array in the View to a function in the Controller with AJAX?

This doesn\'t seem the work:

$.ajax(
        {
               


        
3条回答
  •  遥遥无期
    2021-02-13 23:05

    You should use on your controller:

    public string SaveTable(object[] function_param)
    {
       //some code
    }
    

    Should do the work, it's for future users.

提交回复
热议问题