TextBox Validating event firing twice
- From: <dan@xxxxxxxx>
- Date: Thu, 14 Jul 2005 07:52:52 +0300
Hello to all
I'm handling the Validating event for one text box.
If something is wrong in user input I show a warning message.
The problem is that if I add [e.Cancel=true] to method the message is
displayed twice (event fired twice).
Without [e.Cancel=true] event is fired once.
if(txtMSG.Length > 0)
{
MessageBox.Show(txtMSG, "Warning !", MessageBoxButtons.OK,
MessageBoxIcon.Exclamation);
e.Cancel = true;
}
Can you help me ?
Thank you !
.
- Follow-Ups:
- Re: TextBox Validating event firing twice
- From: DanDanDan
- Re: TextBox Validating event firing twice
- From: YUN SHI
- Re: TextBox Validating event firing twice
- From: Mona
- Re: TextBox Validating event firing twice
- Prev by Date: RE: DataTable
- Next by Date: Re: Naming conventions best practise
- Previous by thread: RE: DataTable
- Next by thread: Re: TextBox Validating event firing twice
- Index(es):