Rank: Newbie Groups: Member
Joined: 6/17/2022 Posts: 1
|
Hello I'm trying to build a payment terminal software using EO Total for WinForms. For each page, I create a separate UserControl public partial class NumberInputScreen : UserControl { public NumberInputScreen(MainForm parent) { InitializeComponent(); _parent = parent; NumberInputScreenView.Url = _parent.viewPath + "NumberInputScreen.html"; // .... other code } // .... other methods
}
and call them from the MainForm
ScreenPanel.Controls.Clear(); targetScreen.Dock = DockStyle.Fill; ScreenPanel.Controls.Add(targetScreen);
I have a problem that when the page is loaded for the first time, the JavaScript code is not executed.
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi,
Please try to load Url after you have added your control into ScreenPanel.Controls. If you still have problems, you can try to replace your JavaScript code with simple test code such as "console.log('test')" or "alert('test')" and check if those always run properly. If those always run properly, then you can gradually put your original JavaScript code back and see if you can find what triggered the problem.
Thanks!
|