本文介绍了将数组从客户端传递到服务端C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

I am calling a javascript function on button click using onclientclick with below function.

arrValue array will have all the required values and how can I move this array values to server side for further process.





我尝试过:





What I have tried:

function addValues() {
       debugger;
       var arrValue = [];
       var hdnValue = document.getElementById("hdn").value;
       var strValue = hdnValue.split(',');
       for (var i = 0; i < strValue.length; i++) {
           var ddlValue = document.getElementById(strValue[i]).value;
           arrValue.push(ddlValue);
       }
   }

推荐答案







或者使用如下



[]



如果解决方案的解决方案有效,请立即投票



Or use like below

[^]

please up vote if the solution works out of 5


这篇关于将数组从客户端传递到服务端C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-03 20:20
查看更多