织梦CMS - 轻松建站从此开始!

欧博ABG-会员注册-官网网址

nav" for whole site globally in Blazor App. ·

时间:2025-09-07 22:50来源: 作者:admin 点击: 2 次
Is there an existing issue for this? I have searched the existing issues Is your feature request related to a problem? Please describe the problem. In

Is there an existing issue for this?

I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

In the latest Blazor United in .NET 8, the default enabling of "data-enhance-nav" for all navigation has led to several issues. Specifically:

With EF Core, the "Cannot Access Disposed Object Exception" from Data Context occurs frequently. This issue is resolved by disabling "data-enhance-nav" in the hyperlink.

When "data-enhance-nav" is enabled, JavaScript fails to invoke on the target page.

To address these problems, I had to manually set data-enhance-nav="false" for every hyperlink. This process is not only tedious and inefficient but also challenging when hyperlinks are generated from components where I can't set "data-enhance-nav" to "False."

Particularly, those transitioning old ASP.NET Core applications to Blazor will encounter numerous unexpected server and client-side exceptions. After extensive troubleshooting, I realized that these issues stemmed from the "Enhanced Navigation" feature.

Describe the solution you'd like

Allowing us to disable "data-enhance-nav" globally for the entire site would be immensely helpful. Please consider implementing a way to deactivate Enhanced Navigation at the App, Page, and Component levels. Ideally, this feature should default to 'Off,' with the option for users to enable it as needed. Since the ASP.NET Team activated this feature by default, providing a straightforward method to turn it off would be greatly appreciated.

Additional context

No response

(责任编辑:)
------分隔线----------------------------
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 验证码:
发布者资料
查看详细资料 发送留言 加为好友 用户等级: 注册时间:2025-09-08 20:09 最后登录:2025-09-08 20:09
栏目列表
推荐内容