XAF Blazor, C#, Devexpress V23 – Open site in another tab

New XAF blazor dev here!

The goal is to open a new tab / website from a method, in XAF Blazor using devexpress.

For the record I do have the necessary JS module installed, as part of devexpress. Also, do not plan on using any other frameworks or languages.

Please, please keep in mind that this is not my project. So if you are a redditor who’d like to tell me how I’m doing this all wrong, probably true, but keep in mind I’m just doing my job xD.

I’ve looked around in the devexpress and stack overflow forms and found a couple of things. I’ve seen alot about JSRuntime.

So I tried:

`private readonly IJSRuntime jsRuntime;

public ViewInReportDesigner(IJSRuntime jsRuntime)
{
this.jsRuntime = jsRuntime;
}`

Then calling that like this in my method – which I’ll call from my simple action

string url = $"https://desired-url.com"; jsRuntime.InvokeAsync<object>("open", url, "_blank");

Which opened it in the current tab.

I did mess around and also try InvokeVoidAsync.

I’m not exactly sure If I can do this using a Task, since I’m calling this from a devexpress simple action. Which as far as I know cannot be asynchronous.

Kind regards,
Kooka.