在用户控件中:定义函数
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); ;请问该怎么做?
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); ;请问该怎么做?
由AjaxAction.ajax处理,进后台方法。没有执行success。
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("");
}
怎么会弄个用户控件呢!