【发布时间】:2019-07-23 12:40:49
【问题描述】:
我正在使用 jQuery 将 json 数据传递给 Ajax 调用。我想在 global.ascx 上的 Application_BeginRequest 函数中读取这个 json 以获得一些目的。 我在哪里可以在“请求”对象中找到这些数据。 我发现 Questystring 和 Form of Request 对象。两者都是空的。
使用jQuery调用ajax函数如下
问候
乌梅什
var inputData = "{'ID':'" + ID + "', 'Code':'" + Centre +"'}";
var pageURL = window.location.protocol + "//" + window.location.host +
"/webmethod.aspx/MyFunction"
$.ajax({
type: "POST",
url: pageURL,
data: inputData,
contentType: "application/json; charset=utf-8",
dataType: "json",
【问题讨论】:
-
为了让我们更好地帮助您,请更新您的问题,以便在minimal, complete, and verifiable example 和take the tour 中显示您的相关代码。添加 HTML,以及复制问题所需的一切。
标签: request http-post asp.net-ajax