You can do this by using AJAX call.
1.In the next example I am doing indirectly AJAX call by using jQuery, and I am sending 5 parameters with values from the current page controls:
function computeQuantity(computeUrl) {
var itemComment1 = $("#itemComment").val();
var itemAmount1 = $("#itemAmount").val();
var itemLength1 = $("#itemLength").val();
var itemWidth1 = $("#itemWidth").val();
var itemThickness1 = $("#itemThickness").val();
$.post("/" + computeUrl + "/ComputeQuantity", { itemComment: itemComment1, itemAmount: itemAmount1, itemLength: itemLength1, itemWidth: itemWidth1, itemThickness: itemThickness1 },
function (result) { $("#defineQuantity").html(result); });
return true;
}
2.In the next example I am using direct AJAX call for sending
address
parameter:
function CartAddressChanged() {
var address = $("#_addressTypeDropDown").val();
$.ajax({
type: "POST",
url: "/Order/CartForNewAddress",
data: "address=" + address,
success: function () {
document.location = "/Order/ShoppingCart";
},
error: function (jqXHR, exception) {
alert('Uncaught Error.\n' + jqXHR.responseText);
}
});
return false;
};