Вы пытаетесь передать 'monitor' методу change, но на самом деле вызываете его. Это должно выглядеть так (без паренов)
var target = $('#txtBarcode'), val = target.val();
target.change(monitor);
function monitor() {
Вы также всегда можете объявить это встроенным:
var target = $('#txtBarcode'), val = target.val();
target.change(
function() {
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
data: "{}",
url: "HomePage.aspx/SearchProduct",
dataType: "json",
success: function(data) {
alert("Success!!!");
}
});
});