How to open a window on a web desktop from another window already opened

0
0

I have a web desktop that has a menubar with a button that opens a window(Window1) that has an iFrame panel that has an aspx page loaded.

The form in the window works perfectly and retrieves sql data.

Once the data is retrieved, I attempt to open a second window(Window2) which also contains an iFrame panel with an aspx form.

Once the first window does its thing and gets the required data, I call a subroutine to open the second window on the desktop using this code:
<Wisej.Core.WebMethod>
Public Shared Sub openWindow(WindowName As String)

Select Case WindowName
Case “Window1”
Dim newWindow1 As New Window1()
newWindow1.Show()
Case “Window2”
Dim newWindow2 As New Window2()
newWindow2.Show()
newWindow2.BringToFront()
End Select

End Sub

I added a second button to the menubar to launch the second window manually and it does work.

But I can’t figure out how to get the first window to open the second wind.

I have included some of the files in question, I can’t send everything because of its size.

Please help!

 

 

  • You must to post comments
0
0

Hi Steve,

Sorry for the late response, to make a better understanding of what my colleague Julie wrote in a comment earlier, I have attached a sample.

In Window1, we don’t use an iFrame but instead we use the AspNetPanel control, and if you look at WebForms1.aspx.vb, you’ll see that we used a server side event to bring up or create the second form.

HTH,
Alaa

  • Steve Gavrilles
    Thanks for your help! once I flipped to using an aspnetpanel instead of an iFrampanel my code started working with only a few change.
  • You must to post comments
0
0

Does anyone on this forum have any ideas on this?

 

  • You must to post comments
0
0

Here is a modified sample using standard microsoft buttons.

 

Thanks.

Attachment
  • Julie
    • Julie
    • Mar 24, 2025 - 2:04 pm
    You cannot do it by posting a message to the iframe. You don’t have any code in there that listens to the message. Use the AspNetPanel. Attach an event to the button in C#, in the code behind use FindForm() or FindPage() to get the container and use any method or property on the server side.
  • Julie
    • Julie
    • Mar 24, 2025 - 2:05 pm
    In the code behind you need to add using Wisej.Web to use the extension methods this.FindForm() or this.FindPage(). Cannot be done in javascript in an iframe.
  • You must to post comments
0
0

I have made a generic Web Desktop app with a menubar with 2 entries.

There are 2 windows and 2 aspx web pages that are loaded into the iFrame panels on each window.

If you run the program and open the first window from the menubar, you will see a button that is in an iFrame panel.

I need to be able to open web desktop windows from within an iFrame panel.

I have tried many scenarios but none of them work.

 

Please help…

Attachment
  • Frank (ITG)
    Hi Steve, please provide us with a simple compilable test app that has no dependencies to DevExpress and we can take a closer look. Best regards, Frank
  • You must to post comments
0
0

“I added a second button to the menubar to launch the second window manually and it does work.”- To me, this sounds as though there probably isn’t a bug in Wisej

Set a breakpoint-is your subroutine being called? My guess is that the code inside the subroutine works fine, there’s just some kind of bug where the subroutine isn’t being called.

If you can create a small runnable test case (use simpler windows so the file size is smaller, also make sure to delete the bin and obj folders) then we can investigate it. Otherwise, you’d need to pay for premium support in order for us to debug your larger application. See here: https://wisej.com/services-packages/

Julie

  • You must to post comments
Showing 5 results
Your Answer

Please first to submit.