【问题】Asp.net MVC 的cshtml页面中调用JS方法传递字符串变量参数 【问题】Asp.net MVC 的cshtml页面中调用JS方法传递字符串变量参数。 【解决】直接对变量加引号,如: <button onclick="deleteProduct('@product.Id');">删除</button>