Here is how I call it now:
if (firstPass == secondPass) {
$.ajax({
url: "/Settings/EditSettings",
type: "PUT",
data: {
user: "someName",
pass: "password",
email: "someEmail"
}
});
}
My controller is called SettingsController, and the method in it:
[AcceptVerbs(HttpVerbs.Put)]
public void EditSettings(string user, string pass, string email)
{
///
}
But it never gets called. Why?
the code seems fine.. the only issue appears to be not inclusion of Jquery before calling this Javascript snippet.
(for details see the comments)