I can't figure out what I am doing wrong with the following WebMethod. I am sure the syntax is correct because the exact same code works in a different web app. I am guessing I need a different reference or something. Nonetheless, I can't figure it out.
Here is the test WebMethod.
[WebMethod()]
public static string test(string Test)
{
return "test";
}Here is the JSON code:
var request = $.ajax({
type: 'POST',
url: '/WebMethods.aspx/test',
data: '{Test: "' + 'Test' + '"}',
contentType: "application/json; charset=utf-8",
dataType: "json",
});
request.done(function (data) {