程晓晖

博客园 首页 新随笔 联系 订阅 管理

第一种方式 
前台
  $.post("/home/test", { ck: { 0: "c", 1: "k"} }, function (data) {  }, "text");
后台
      public ActionResult test(FormCollection fc)
        {
            string temp = fc["ck[0]"]; // string temp = Request["ck[0]"];
            //string tmep =fc["ck[1]"];
            return View();
        }

第二种方式
前台
  $.post("/home/test"," ck=c&ck=k",function(data){},"text");
后台
      public ActionResult test(FormCollection fc)
        {
          string [] arry=fc["ck"].split(",");
            string data1=arry[0];  //c
           string data2=arry[1];  //k
        }
posted on 2011-04-07 22:35  fumen  阅读(715)  评论(0编辑  收藏  举报