I am currently utilizing ASP.Net Core and have implemented EntityFramework to create a controller with views. Specifically, I am in the process of enhancing the Index view to make it dynamic with dropdown selections. I have successfully completed everything except for encountering errors within my JavaScript function.
Let me pinpoint the section presenting the error. The issue arises on the s+= line, where an unexpected identifier error occurs. Could someone identify the root cause of this problem? My objective is to replace the entire line containing result[i].name and result[i].value with data received from my controller.
for (var i = 0; i < result.length; i++) {
s += '<tr><td>'result[i].name'</td><td><a asp-action="Edit" asp-route-id="'result[i].value'">Edit</a>| <a asp-action="Details" asp-route-id="'result[i].value'">Details</a> |<a asp-action="Delete" asp-route-id="'result[i].value'">Delete</a></td></tr>';
}