When a user clicks on the button, I am attempting to call an EditDetails JavaScript function only if the user has Admin permissions. Otherwise, the button is disabled.
However, there seems to be an error message stating "Cannot implicitly convert type bool to string" related to the name of the JavaScript function.
What might be causing this issue?
<img src='../../Images/Edit.png' alt='Click to Edit'
onclick="@(Model.AdminPermissions ? "javascript:EditDetails('#@rowId');" : "")" disabled="@(Model.AdminPermissions ? "" : "disabled")"