Could please advise me the way of open a page in new tab using Navigation manager and how to show pdf file in browser window?
Could please advise me the way of open a page in new tab using Navigation manager and how to show pdf file in browser window?
Hi, @AnanthamS-6846 ,
The way of open a page in new tab
Try JSRuntime.InvokeAsync to open in new tab.
await JSRuntime.InvokeAsync<object>("open", "navigate", "_blank");

show pdf file in browser window
You can open pdf file directly via a tag.
<a href="./HelloWorld.pdf" target="blank">Go to Hello</a>

If the answer doesn’t solve your issue, please provide more details of error that will help us track down what’s happening.
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best Regards,
Michael Wang
It's giving following error!!
blazor.webassembly.js:1 Uncaught (in promise) TypeError: Converting circular structure to JSON
--> starting at object with constructor 'Window'
--- property 'window' closes the circle
at JSON.stringify (<anonymous>)
at blazor.webassembly.js:1
I was getting this error as well
change InvokeAsync<object> to InvokeVoidAsync and it seems to stop happening
strURL = "pages/mypage";
await JS.InvokeVoidAsync("open", strURL, "_blank");
5 people are following this question.