zoukankan      html  css  js  c++  java
  • 安了个vs 2008 express后,诡异asp.net Ajax PageMethods的问题,怎么解决?

    昨天调试好网站睡觉...
    今天一起来,突然网站报错
    说ResponseText属性未实例化
    ResponseText是我自写的类ServerResponse的一个属性
    该PageMethods如下:
            [ScriptMethod(ResponseFormat = ResponseFormat.Json, UseHttpGet = true), WebMethod]
            
    public static ServerResponse GetGroupList(int nowpage,int everypage,byte type) {
                
    long userid = 0;
                
    if (!long.TryParse(HttpContext.Current.Session["userid"].ToString(), out userid)) {
                    
    throw new Exception("非法操作.");
                }
                GroupList nr 
    = new GroupList();
                return nr.GetServerResponse();
            }
    昨天我在JS中
    PageMethods.GetGroupList($get("HdPage").value,10,0,function(_r){        
                $get(
    "MyGroupItems").innerHTML=_r.ResponseText.trim()==""?"<li>没有符合的数据</li>":_r.ResponseText;
            },
    function(result){alert("error:" + result.get_message());} );

    即可以调用
    也就是用,_r.ResponseText
    而我安了个vs 2008 express后,只能_r.d.
    ResponseText这样调用了,大家知道这是为什么吗?
    引用的Asp.net Ajax还是1.XXXXX没变....我汗

  • 相关阅读:
    电子商务测试点总结
    pc 端 测试点总结
    web测试点总结
    Monkey脚本API
    Git 命令
    配置samba的流程
    scrapy使用指南
    链接
    顺序表总结
    python数据类型——字符串类型
  • 原文地址:https://www.cnblogs.com/chsword/p/871165.html
Copyright © 2011-2022 走看看