在用户控件中:定义函数
function Show(op)
    {       
        $.ajax({
            type:"get",
            url:"Test.ascx",
            data:"type=List&id="+op+"&num="+Math.random(),
            success:function (msg)
            {
            alert(msg);              
            }
        });
    }
这样子由Test.ascx处理,不执行 alert(msg);        ;
如果单独建一个AjaxAction.aspx 处理请求,也是不执行alert(msg);        ;请问该怎么做?

解决方案 »

  1.   

    由Test.ascx处理,调试的时候不进后台方法。 
    由AjaxAction.ajax处理,进后台方法。没有执行success。
      

  2.   

    Response.End();
    type: "POST",
      url: "Test.ashx",
      dataType: 'json',
      success: function(res) {
      alert(res);
      },
    public void ProcessRequest(HttpContext context)
      {
      context.Response.ContentType = "text/plain";  context.Response.Write("");
        
      }
      

  3.   

    换成ashx或aspx
    怎么会弄个用户控件呢!
      

  4.   

    都用JQUERY了干吗还非得整个用户控件呢