如何将参数作为数组传递给方法 [英] how to pass the arguments to a method as an array

查看:111
本文介绍了如何将参数作为数组传递给方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为视图中的变量分配了数组值.我想在控制器中将该值用作数组.我如何将该变量作为控制器中方法的参数传递.

I assigned array value to a variable in the view.and i want to use that value in the controller as an array.how can i pass that variable as a parameter for the method in the controller.

var gridArray = new Array(g_rows);
           for (var i = 1; i < g_rows; i++) {
                   gridArray[i] = new Array(g_colums);
                   for (var j = 1; j < g_colums; j++) {
                       var val = mygrid.cells(i,j).getValue();
                        gridArray[i][j] = val;



我如何将这个值作为参数传递给控制器​​.



how can i pass this value to the controller as a parameter.

推荐答案

我已经做到了,但是使用了json和ajax.我不确定您可以通过回发来做到这一点.
I have done this, but using json and ajax. I am not sure you can do it with a postback.


这篇关于如何将参数作为数组传递给方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆