Re: TextBox Validating event firing twice
- From: "DanDanDan" <dan@xxxxxxxx>
- Date: Thu, 14 Jul 2005 09:21:10 +0300
SOLVED
My mistake. I manage the enter key in KeyPress event and I doubled this key
by mistake.
Thank you all !
Dan
<dan@xxxxxxxx> wrote in message
news:OpuL5%23CiFHA.3568@xxxxxxxxxxxxxxxxxxxxxxx
> 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 !
>
.
- References:
- TextBox Validating event firing twice
- From: dan
- TextBox Validating event firing twice
- Prev by Date: App.ico
- Next by Date: App.ico
- Previous by thread: Re: TextBox Validating event firing twice
- Next by thread: TextBox Validating event firing twice
- Index(es):