I am trying to send my email and password to my home Controller jsonresult method. values of email and password are displayed in first alert but when i am passing userCredential to data it displays alert undefined. values of email and password are not getting passed in ajax post method
    $("#button_val").click(function () {
        var userCrdential = "email=" + $("#username").val() + "&password=" 
                              + $("#pwd").val();
        alert(userCrdential);
        $.ajax({
            type: "POST",
            url: "/Home/adduser",
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            data: userCrdential,
            success: function (res) {
                //  alert("data is posted successfully");
                if (res.success == true)
                    alert("data is posted successfully");
                else {
                   // alert("Something went wrong. Please retry!");
                }
            },
            error: function (xhr, textStatus, errorThrown) {
                alert(xhr.statusMessage);
            }
        });
    });.
controller
[HttpGet] public JsonResult adduser(user obj) { }
 
     
    