I want to use a Model value as jquery variable. In my case idinv and app. How do I pass it?
$(function () { $("#Member").on("change", function () { var categoryId = $(this).val(); var idinv [email protected]; var app = @Model.APP; var msg = ""; $.getJSON(`?handler=CheckUserName&id=${categoryId}&idinv=${idinv}&app=${app}`, (data) => { if (data == true) { $("#btnSubmit").attr("disabled", true); msg = msg + categoryId + " " + "is already member of Investigation Team"; } else { $("#btnSubmit").attr("disabled", false); } $("#msgUN").text(msg); }); }); });