I have use this code for send value and hit api. But I have face a problem multiple value not send.
function CancelSubscription() {
var UserID = "@UserId"; // without send this It's working, but i have send this it's not working
var SubscriptionID = "@SubscriptionID";
var data = new FormData();
data.SubscriptionId = SubscriptionID;
data.UserID = UserID;
var apiurl = "https://localhost:44356/api/Subscription/UpdateCardDetail";
$.ajax({
type: "POST",
url: apiurl,
data: JSON.stringify(data),
datatype: "json",
contentType: 'application/json; charset=UTF-8',
success: function (response) {
if (response.isSuccess == true) {
}
},
});
}