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没变....我汗

  • 相关阅读:
    Python2 cmp() 函数
    Python round() 函数
    Python floor() 函数
    Python ceil() 函数
    Python abs() 函数
    Python oct() 函数
    Python ord() 函数
    Python hex() 函数
    Python2 unichr() 函数
    Android--------工具类StatusBarUtil实现完美状态栏
  • 原文地址:https://www.cnblogs.com/chsword/p/871165.html
Copyright © 2011-2022 走看看