I'm trying to do an integration and I have a url. My ASPxButton is as follows:
<dx:ASPxButton ID="btn1" runat="server"
Text="Start Integration" Height="18px" Width="77px">
<FocusRectPaddings Padding="0px" />
</dx:ASPxButton>
And my click event is as follows:
Protected Sub btn1_Click(sender As Object, e As EventArgs) Handles btn1.Click
......
Dim urlForNewTab = "https://.../test.html?recordId=" + record.ToString + "&accessToken=" + token
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "OpenWindow", "window.open('" & urlForNewTab & "');", True)
'btn1.OnClientClick="javascript:window.open('" + urlForNewTab + "');"
'Response.Redirect(urlForNewTab )
End Sub
I tried many things but it didn't work? I tried to cancel reloading the page, it still didn't work.
I did the instructions in the link below and it worked.
https://www.aspsnippets.com/questions/133817/Open-new-Window-from-Server-side-without-Page-Refresh-in-ASPNet/