I have a view called InvoiceTo and a Controller called Order. Using JQuery, the default URL is: url: ''
, and this is the result:
locahost:port/domain/order/InvoiceTo
If I change the URL: url: /Order/GetInformation
, this is the result:
locahost:port/domain/order/InvoiceTo/Order/GetInformation
I've already tried lots of way to set my url, but is always wrong. This is my JQuery:
$(document).ready(function () {
$('#InvoiceToDrop').change(function () {
var $div = $('#modalPartial');
var idcustomer = $(this).val();
$.ajax({
url: '/Order/GetInformation/' + idcustomer,
type: 'GET',
success: function (data) {
alert(JSON.stringify(data));
},
error: function (error) {
}
})
});
});
What I have to do to have this URL:
locahost:port/domain/Order/GetInformation/1