All Answers

0 votes

I tried with both events, just Application.ApplicationRefresh is called, but as I told you, the Application.Url does not contains the code. See attached printscreen.

The code is:

private static void Application_ApplicationRefresh(object sender, EventArgs e)
{
Log(“Application_ApplicationRefresh:” + Application.Url);
MessageBox.Show(“Application_ApplicationRefresh:\n” + Application.Url);
}

  • Adrian Zagar answered Dec 1, 2024 - 2:14 pm
  • last active Dec 1, 2024 - 2:15 pm
0 votes

Hi Adrian,

I don’t think I fully understood what you want to achieve.
Do you want to persist the parameters p1 and p2 that you receive when your application is launched?
If yes, just store them into your session.

For ApplicationRefresh and ApplicationHashChanged, they are regular .NET events and you can subscribe to them
like you would for any other event.

Best regards
Frank

0 votes

Hi Frank, thank you for answering.

Now I detect that change in Page.Appear event, not very elegant, but it’s called. Problem is that Application.Url replace the part I need. Instead of “https://myaddress/?code=somecode” (that can be seen on browser address) I get https://myaddress/?_sc=something. I presume that Wisej replaces real parameters with that _sc, probably to retrieve my session. So, up until now, the single point where I can get the real parameters from calling http is on Program.Main.

So the problem persists.

As a bonus, please instruct me how to overwrite events ApplicationRefresh or ApplicationHashChanged.

0 votes

Hi Adrian,

you might want to check out the events ApplicationRefresh or ApplicationHashChanged and query the Application.Url property.

Best regards
Frank

0 votes

i used the property
Public Class FrmMain
Private Sub FrmMain_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Application.EnableUnloadConfirmation = True
End Sub

End Class

And it succeeded in notifying when the user closes the browser, however, I want to execute additional command after the user selects Leave and exits the browser, which method should I call? Please help

0 votes
In reply to: License error

Well the problem disappeared after building the next docker image.  The only thing I can think of is I was adding SCP/SSH to the app, which is still in there so I don’t know.

0 votes

We are running into a similar issue, but it persists even after upgrading to 3.5.12. Was there anything else I needed to do to correct this problem?

0 votes
In reply to: License error

Hi Granger,

Does the container have unrestricted access to the internet?

Can you verify if the web.config file is present inside the container?

Make sure that it’s web.config, not web.Release.config or web.Debug.config, if they are present inside the container please delete them.

Best Regards,
Alaa

0 votes

Hi Rabeeh,

Would be able to state the Wisej.NET version and write a small, reproducible sample?

Best Regards,
Alaa

0 votes

Hi Nhan,

We also have Application.EnableUnloadConfirmation that you can use.

Best Regards,

Alaa

0 votes

Hi Nhan,

You can call this in Program.cs:

Application.Eval(@”window.addEventListener(‘beforeunload’, (event) => {
// Set the returnValue property to display a confirmation dialog
event.preventDefault(); // Some browsers require this call
event.returnValue = ”; // A string value is required in some browsers
});”);

Best Regards,
Alaa

0 votes

Hi Alaa,

Thanks for the reply.

It works OK now.

Best regards,

Peter

 

 

0 votes

Hi Peter,

You’ll want to reset the TextBox to the default color when the condition is not satisfied.

Items inside the DataRepeater are cloned, meaning when you change the color once, and it gets reused, you’ll see that change reflected on multiple textboxes as well.

This code should fix it!

Dim lbl = e.DataRepeaterItem.Controls.Find(“txtAmount”, True).FirstOrDefault()

If lbl IsNot Nothing AndAlso Not String.IsNullOrEmpty(lbl.Text) Then
Dim value As Integer
If Integer.TryParse(lbl.Text, value) Then
If value < 10 Then
lbl.BackColor = Color.Orange
Else
lbl.BackColor = Color.White
End If
End If
End If

Best Regards,
Alaa

0 votes

Hi Peter,

thanks for the sample. I could open it and see what you described.
We’ll check it and get back to you.

Best regards
Frank

0 votes

Hi Frank,

I assume you cannot open the solution in the previous message.

I could not, so attached the one I also could open and is within the max update size.

Please let me know if you can open the solution.

BR

Peter

0 votes

Hi Frank,

Attached the testexample.

I am using version 3.5.11

BR

Peter

0 votes

Hi Peter,

I still cannot reproduce the behavior that you are describing.
Can you please attach a complete runnable test case instead of code snippets in screenshots?
Please also let us know which Wisej.NET version you are using.

Thanks in advance.

Best regards
Frank

0 votes

Hi Frank,

Again sorry for the wrong code attached.

Herewith the correct code.

BR,
Peter

 

0 votes

Hi Frank,

Sorry for the wrong results I sent before.

I have attached new code and rsults.

I have used a DataRepeater and a Datagrid to compare and show the differences.

It looks like the itemUpdate on the  Datarepeater is causing issues when scrolling.

The difference beteween both views is that the formatting a the Datagrid is performed after CompletedBinding and the datarepeater after ItemUpdate.

BR,

Peter

 

 

 

0 votes

Hi Frank,

I am programming in VB.

Code for DataRepeater.ItemUpdate and result: Only first 10 records (repeater items) are OK. Next records NOK.

 

See attachments.

 

BR,

Peter

Showing 181 - 200 of 11k results