We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
is it somehow possible (in Blazor) to programatically open a url in new tab?
Best regards, Thomas
The text was updated successfully, but these errors were encountered:
Thanks for contacting us, @TFTomSun. @SteveSandersonMS is this something possible with pure Blazor, or should this be achieved with JSInterop for now?
Sorry, something went wrong.
You'll need to use JS interop for this.
Just in case someone else come accross this post...
public async Task NavigateToUrlAsync(string url, bool openInNewTab) { if (openInNewTab) { await JSRuntime.Current.InvokeAsync<object>("open",url,"_blank"); } else { this.UriBuilder.NavigateTo(url); } }
href
No branches or pull requests
Hello,
is it somehow possible (in Blazor) to programatically open a url in new tab?
Best regards,
Thomas
The text was updated successfully, but these errors were encountered: