在同一解决方案中,如何使用asp:MenuItem NavigateUrl属性调用BlazorServer应用程序? [英] How to use asp:MenuItem NavigateUrl property to call BlazorServer app in the same solution?

查看:193
本文介绍了在同一解决方案中,如何使用asp:MenuItem NavigateUrl属性调用BlazorServer应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在同一解决方案中,如何使用asp:MenuItem NavigateUrl属性调用BlazorServer应用程序? 我有一个解决方案.解决方案具有使用diff框架的不同项目,例如.net 4.6.1和Core .3.1.在.net 4.6.1 Web应用程序项目中,我想调用Blazor服务器应用程序(EDBBlazorServer)项目.你能告诉我怎么做吗?

How to use asp:MenuItem NavigateUrl property to call BlazorServer app in the same solution? I have a solution. Solution has different projects with diff framework such as .net 4.6.1 and Core .3.1. Inside the .net 4.6.1 web app project, I would like to call the Blazor server app(EDBBlazorServer) project. Could you please tell me how to do this?

我已经尝试过这一行,它将无法正常工作. < asp:MenuItem NavigateUrl ="/EDBBlazorServer/_Host"; Text ="MyLinktoBlazorServerLandingPage"/>

I have tried this line, it will not work. <asp:MenuItem NavigateUrl="/EDBBlazorServer/_Host" Text="MyLinktoBlazorServerLandingPage" />

推荐答案

< asp:MenuItem NavigateUrl =" https://localhost:44320/EDBBlazorServer/_Host" Text ="MyLinktoBlazorServerLandingPage"/>

<asp:MenuItem NavigateUrl="https://localhost:44320/EDBBlazorServer/_Host" Text="MyLinktoBlazorServerLandingPage" />

以上行有效.

但是,在运行此应用程序之前,您需要确保在解决方案的属性中设置多个启动应用程序.需要将Blazor应用程序和Webforms应用程序设置为在多个启动项目"下启动.

however prior to running this, you need to make sure to set multiple startup app in the properties of the solution. Blazor app and and webforms app need to be set to start under "multiple startup project"

这篇关于在同一解决方案中,如何使用asp:MenuItem NavigateUrl属性调用BlazorServer应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆