I am working on MVC project and I am running into an error when I am trying to open a Bootstrap modal.
The error message I am getting is:
Uncaught SyntaxError: missing ) after argument list
This is the button with the OnClick call:
<button id="btnVenueDelete" onclick="DeleteModal(@item.VenueName, @item.VenueID);" class="btn btn-sm btn-info">Delete</button>
This is the JavaScript function:
function DeleteModal(name, id) {
console.log(Name);
console.log(ID);
txtModal.innerText = "Delete" + Name;
$("#VenueModal").modal();
}
I think the problem is due to something in the button as I am not seeing the console logs in the developer console.