前台使用EXTJS comboBox控件
        Ext.onReady(function () {            var combo2 = new Ext.form.ComboBox({
                store: new Ext.data.SimpleStore({
                    autoLoad:true,
                    url: "cm7.aspx",                
                    fields: ["val", "name"]
                }),
                emptyText: '请选择一个产品....',
                triggerAction: 'all',
                hiddenName: "c3",
                readOnly: true,
                mode: "local",
                valueField: "val",
                displayField: "name",
                renderTo: Ext.getBody(),
                listeners: {
                    "select": function () {
                        alert(Ext.get("c3").dom.value);
                    }
                }
            });        })
后台cm7.aspx直接PAGE_LOAD事件中写入 Response.Write("[['00000003','硬膏剂'],['00000005','滴眼剂'], ['00000016','栓剂'], ['00000017','注射剂']]");
COMBOBOX下拉框无值.
请问什么原因,怎么改?如果我将前台改成       Ext.onReady(function () {
  
            var combo2 = new Ext.form.ComboBox({
                store: new Ext.data.SimpleStore({
                    data:<%=GETData()%>,               
                    fields: ["val", "name"]
                }),
                emptyText: '请选择一个产品....',
                triggerAction: 'all',
                hiddenName: "c3",
                readOnly: true,
                mode: "local",
                valueField: "val",
                displayField: "name",
                renderTo: Ext.getBody(),
                listeners: {
                    "select": function () {
                        alert(Ext.get("c3").dom.value);
                    }
                }
            });        })
直接在本页的CS文件里加入GETData方法
写入
return "[['00000003','硬膏剂'],['00000005','滴眼剂'], ['00000016','栓剂'], ['00000017','注射剂']]";这样前台comboBox就有下拉值了..
请问第一种方法错在哪了?和第二种有什么区别?请教各位大侠

解决方案 »

  1.   

    第一种可以呀
    HttpContext.Current.Response.Write(ExtTree.Current.CreateExtTreeJSON());
    HttpContext.Current.Response.End();
      

  2.   

    楼上说的是什么?说详细点吧?ExtTree是什么?
      

  3.   

     Response.Write("[{'00000003','硬膏剂'},{'00000005','滴眼剂'}, {'00000016','栓剂'}, {'00000017','注射剂'}]");
    Response.End();
      

  4.   

    问题已解决了.
    为什么要Response.End();
    能说下吗?