I have an asp.net application with a static page method. I use the codes below to call a method and get its return value.
$.ajax({ type: "POST", url: "myPage/myMethod", data: "{'parameter':'paramValue'}", contentType: "application/json; charset=utf-8", dataType: "json", success: function(result) {alert(result);} });
What I got is [object Object].
Below is my static method. And I also have EnablePageMethods="true" EnablePartialRendering="true" in my ScriptManager.
[WebMethod] [ScriptMethod] public static string myMethod(string parameter) { return "Result"; }
Is there any way to get the return value?
source share