是否可以将值从剃须刀组件传递到剃须刀页面?

发布于 2025-02-01 16:42:56 字数 204 浏览 2 评论 0原文

我将Razor组件集成到我的Blazor WebAssembly项目中的ASP.NET Core Razor页面中,以使客户端和服务器之间的UI保持一致。

这些组件之一是多选择的下拉列表,我很难获得剃须刀页面的模型以绑定到组件中的值。

有其他方法可以将数据从组件传递到页面吗?我知道,通过参数以另一种方式传递数据很容易,但是我正在努力弄清楚如何以相反的方式进行操作。

I'm integrating Razor components into ASP.NET Core Razor Pages in my Blazor Webassembly project in order to keep the UI consistent between the client and server.

One of these components is a multiselect dropdown and I'm having a really hard time getting the model of my Razor page to bind to the values in my component.

Is there another way I can pass data from my component to the page? I know it's easy to pass data the other way via parameters, but I'm struggling to work out how to do it the other way around.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文