This is my code on the razor view engine
<a href="#" onclick="Delete('@recordID', '@pID');" id="@pID.ToString()">Delete</a>
I have an external js file which contains the code for function detele:
alert('external');
function Delete(recordID, pID) {
alert('function called');
}
I added alert('external'); to check if I have the correct reference to the external js file, and it worked. Not sure why it keeps returning js error: Microsoft JScript runtime error: 'Delete' is undefined