October 23, 2024
Chicago 12, Melborne City, USA
CSS

HTML Bookmark Link / Blazor Anchor Link scroll to top my content gets hidden inside Appbar


I was trying to create Anchor Link or Bookmark for some contents. My issue is on click bookmark href link it scroll and take me to content right but my problem is some content goes hidden inside Appbar area and Unhandled Error throws on Blazor Page. Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: Cannot parse the value ‘7900#headerC’ as type ‘System.Int32’ for ‘Wid’.
System.InvalidOperationException: Cannot parse the value ‘7900#headerC’ as type ‘System.Int32’ for ‘Wid’.

Reproduction Link : https://try.mudblazor.com/snippet/wOmevkccSpKqHzBw

I tried same as trysnippet for my blazor demo page just add AnchorNavigation tag to my demo page and added javascript BlazorScrollToId in index.html others all same as trysnippet and its working is same in both.

reference for blazor Anchor link : https://www.meziantou.net/anchor-navigation-in-a-blazor-application.htm



You need to sign in to view this answers

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video