How to use asp:MenuItem NavigateUrl property to call BlazorServer app in the same solution?

414 Views Asked by At

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?

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

1

There are 1 best solutions below

0
On

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

above line works.

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"