I have a messagebox with two buttons and a text. This is the relevant code:
var result = MessageBox.Show("just a text","just a title",MessageBoxButtons.OKCancel,System.Windows.Forms.MessageBoxIcon.Warning,System.Windows.Forms.MessageBoxDefaultButton.Button1, System.Windows.Forms.MessageBoxOptions.ServiceNotification | System.Windows.Forms.MessageBoxOptions.RightAlign);
if (result == DialogResult.OK)
{
... code ...
}
My problem is that the program enters the code inside the "if" automatically and the pop up message box doesn't even show up. Even when i debug it I see that the code goes to the "if" row and the result is DialogResult.OK.
I am using web forms and ASP.Net.
the namespace for the MessageBox is "System.Windows.Forms".
I tried clearing the cache and even iisreset.
What else could help me?
Thank you in advance.