I am calling a WebMethod() using $.ajax() and it doesn't seem like the VB is handling the data correctly.
Here is my JS:
$.ajax({
type: "POST",
url: "Default.aspx/RemoveUser",
data: "{'s':'test'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (msg) {
alert(msg.d);
},
error: function (jqXHR, textStatus, errorThrown) {
alert(textStatus + "\n" + errorThrown);
}
});
And I created two RemoveUser functions, below:
<WebMethod()> _
Public Shared Function RemoveUser(ByVal s As String) As String
Return s
End Function
and
<WebMethod()> _
Public Shared Function RemoveUser() As Boolean
Return True
End Function
However, when I execute the above JS I get "true" returned. It is passing the data correctly:

Commenting out the RemoveUser(ByVal s As String) function does not change behavior at all.