Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DialogResult = OK
Message
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Titre:
DialogResult = OK
Divers
Thread ID:
00983255
Message ID:
00983255
Vues:
60
I've got a simple input form with an OK, a Cancel button and a combobox.
The OK button has DialogResult = OK.
I thought I would add some code to the click event of the OK button just in case the user "forgot" to select something from the combobox. If nothing is selected I want to display a messagebox (or slap the user upside the head) and return back to the form. The problem I have noticed is that when DialogResult is set for the button the form closes by itself after the code has executed.
Is there any way to prevent the form from closing?

Thanks,
Einar
Semper ubi sub ubi.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform