I have the following code in my aspx.cs file:
[System.Web.Services.WebMethod]
public static string PostPin() {
return "Rahul";
}
And the following Javascript:
$.ajax({
type: "POST",
url: "/adfs/ls/RequestPinForm.aspx/PostPin",
contentType: "application/json; charset=utf-8",
success: function(data) {
alert(data);
},
error : function(data , data2 , data3) {
alert(data);
}
});
I'm using the alert's to see the returns of what is coming back, but I can never get it to return the string.
Any ideas guys?