jQuery的post方法使用

$.post("../URL.ashx", { Parameter1:Parameter1 Value,Parameter2:Parameter2 Value}, function(data){
        $("#<%=txtFieldValue.ClientID %>").val(data);//处理返回信息

});

http handler URL.ashx文件中:

context.Response.ContentType = "text/plain"

获取传递的参数

context.Request("Parameter1")

返回需返回的信息

context.Response.Write(“需返回的信息”)

原文地址:https://www.cnblogs.com/blackbean/p/2725501.html