Blazor link - disable href if there's an onclick method
问题 In Blazor I have an <a> element that has both a href and an onclick method: <a href="" onclick="@(() => ChangePage(_someObject))">Test</a> onclick calls this method: private bool ChangePage(object objectToDisplay) { _currentObject = objectToDisplay; StateHasChanged(); return false; } Normally in JavaScript returning false from the event method stops the subsequent navigation to the link in the href but this doesn't seem to be working with my code above. How can I stop Blazor changing the page