lixiaoying19830417
2015-05-22 09:03 阅读 881

dwz 关于查找带回,带下拉级联的问题

是一个关于查找带回,带级联的问题,下拉列表为何没有值呢?

asp代码:


客户姓名:



postField="keyword" suggestFields="userList.danhao,userList.xingming" class="required"
suggestUrl="/Module/BaoxiuGuanli/ShouHouChaZhaoDaiHui.aspx" lookupGroup="userList"/>
lookupgroup="userList">查找带回 href="#">清除选择

后台代码:
StringBuilder userList = new StringBuilder();
userList.Append("[");
int row = 0;

        foreach (tbaoxiuguanliData areaData in userList1)
        {
            row++;
            userList.Append("{\"" + "id" + "\"" + ":" + "\"" + row + "\"" + "," + "\"" + "danhao" + "\"" + ":" + "\"" +
                    areaData.Danhao + "\""+","+ "\"" + "xingming"+"\""+":"+"\""+areaData.xingming + "\"},");

        }
        //System.Web.HttpContext.Current.Response.Write(userList);
        //Response.End();

        userList.Remove(userList.ToString().LastIndexOf(','), 1);
        userList.Append("]");
        userList.ToJson();

拼出来的值肯定是对的,用断点跟过的,结构如下:

[
{"id":"1","danhao":"01133","xingming":"wang"},
{"id":"2","danhao":"01131","xingming":"wang1"},
{"id":"3","danhao":"01132","xingming":"wang2"},
{"id":"4","danhao":"01129","xingming":"李xiao英"}
]

为什么就是显示不出来呢??明明有值啊!!!

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

相关推荐