I have code as below:
jQuery.ajax({
url: '/Control/delete',
type: 'GET',
contentType: 'application/json',
success: function (bool) {
if (bool == "deleted") {
alert('record deleted');
$(".row" + currentId).hide('slow');
}
else {
alert('not deleted ');
}
}
});
Aay for example I need to send file_id (?file_id=12) paramater using GET, how can i do so?
Use the
dataparameterAlso not that
datacan be also a query string like:In case if its not a query string, jQuery will automatically convert it to query string.
jQuery.ajax docs