我試圖從jQuery傳遞JSON到.ASHX文件。下面的jQuery示例:ASP.NET - 從JQuery傳遞JSON到ASHX
$.ajax({
type: "POST",
url: "/test.ashx",
data: "{'file':'dave', 'type':'ward'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
});
如何檢索我的.ASHX文件中的JSON數據?我有方法:
public void ProcessRequest(HttpContext context)
,但我無法找到在請求中的JSON值。
樣本將幫助您的回覆 http://stackoverflow.com/a/19824240/1153856 – OsmZnn 2013-12-10 13:54:09