我正在尝试将JSON从jQuery传递到.ASHX文件.下面的jQuery示例:
$.ajax({
type: "POST",
url: "/test.ashx",
data: "{'file':'dave', 'type':'ward'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
});
Run Code Online (Sandbox Code Playgroud)
如何在.ASHX文件中检索JSON数据?我有方法:
public void ProcessRequest(HttpContext context)
Run Code Online (Sandbox Code Playgroud)
但我在请求中找不到JSON值.