© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
4 replies
skyslide22

Net8 Blazor onclick="js()" Not Working

i have a button with enhance navigation set to false but the blazor.web.js still fires and replaces my dom manipulations with the result from the server

the onclick is not working, blazot replaces the element instantly after js manipulation
i can see that in the network tab in the chrome dev tools

how can i disable that stuff?

    <a href="#ateam" data-enhance-nav="false" class="btn read-more-cta" onclick="this.style.display='none';">
        Read more
        @* <i class="fa fa-arrow-down"></i> *@
        <i class="fa-regular fa-chevrons-down"></i>
    </a>
    <a href="#ateam" data-enhance-nav="false" class="btn read-more-cta" onclick="this.style.display='none';">
        Read more
        @* <i class="fa fa-arrow-down"></i> *@
        <i class="fa-regular fa-chevrons-down"></i>
    </a>
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ blazor .net8 vs angular
C#CC# / help
3y ago
[blazor .net8] about InteractiveAuto Component
C#CC# / help
3y ago
blazor maui hybrid js initializers not working
C#CC# / help
2y ago
MudBlazor on net8, MudSelect not working
C#CC# / help
3y ago