大火导航经理到指定的URI(Google.com)
我有一个问题,即如何将页面重定向到某些页面,例如
我尝试过的Google.com,但它无法正常工作...
@inject NavigationManager NavigationManager
void()
{
NavigationManager.NavigateTo("google.com");
}
但是它与Ultimate URI转移到了链接。 像Localhost:3030/google.com,
我如何转到Google.com之类的页面?
i have a question about how to redirect page to certain page like google.com
I've tried with below but it's not working...
@inject NavigationManager NavigationManager
void()
{
NavigationManager.NavigateTo("google.com");
}
but it moved to the link with ultimate uri.
like localhost:3030/google.com
how could i move to a page like google.com in Blazor?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
void()
没有有效的C#我认为我们可以猜测您正在尝试什么。只是
“ google.com”
将被视为本地(相对)URI,这将无法使用。使用:
While
void()
isn't valid C# I think we can guess what you are trying.Just
"google.com"
will be seen as a local (relative) URI, that won't work.Use:
如果您想使用单击按钮访问Google页面,则可以这样做
If you want to visit Google page with click of button, you can do it like this