How to prevent default navigation for Blazor NavLink component
问题 Since Blazor 3.1 Preview 2 it should be possible to prevent default navigation behaviour for links in Blazor, as also discussed in this answer. However, this code: <NavLink href="" Match="Match" @onclick:preventDefault @onclick="()=>LinkAction()" > Do something </NavLink> gives this error: The component parameter 'onclick' is used two or more times for this component. Parameters must be unique (case-insensitive) Why is that? 回答1: Although the net result of the HTML <A> tag and the Blazor