大乱人 2015-05-02 14:11 采纳率: 50%
浏览 4288

使用jquery.ajax向后台接收数据

发送数据是直接用

来发送。
ashx中返回了context.Response.ContentType = "text/plain";
context.Response.Write(result);
其中result是StringBuilder。
我想在该页面,用jquery.ajax接收数据,
$.ajax({
type: 'get',
url: 'test.ashx',
dataType: "text",
success: function (a) {
                    alert(a);                    
            }
        });

但是最后执行后,显示的是StringBuilder里的东西。
我想请教下怎样才能弹出框,显示信息?

  • 写回答

2条回答 默认 最新

  • threenewbee 2015-05-02 15:23
    关注

    context.Response.Write(result.ToString());

    评论

报告相同问题?