日期:2014-05-16  浏览次数:20632 次

火速求助!!菜鸟Ajax问题
一个aspx页面,一个ashx页面,,怎么把ashx文件中的context.Response.Write("OK");传到前台的label显示啊?谢谢

这个是ashx  里面的代码
 public void ProcessRequest (HttpContext context) {
        context.Response.ContentType = "text/plain";
        string name = context.Request["name"];
        int names=int.Parse(name);
        string user_id = context.Request["user_id"];
        int use = int.Parse(user_id);
       
       

 
      JavaScriptSerializer jss = new JavaScriptSerializer();
        //等级一
      if (mod.user_score >= 100 && mod.user_score <= 200)
      {
          if (moo.login_score > names && names < 10)
          {
              string json = "OK";
            context.Response.Write(json); 需要把这个到前台显示!!
   
          
          }   
          else {
              string json = "OK";
              context.Response.Write(json);
          }
           
        
      }


前台代码   主要是这里不晓得改   帮忙改改吧
   $(function () {
            $("#txtContents").keyup(function () { //键盘弹起的时候发生
                if ($("#txtContents").val().length > 0) { //文本框不为空时发生   
                    $("#ulContent").attr("style", "display:block");