Thursday, March 29, 2012

onTextChanged event not firing with ENTER key

I've got a form that is supposed to validate data entry from a bar code scan
ner. The scanner is set up to add a carriage return at the end of the data
in the barcode, which should fire the onTextChanged event to validate the in
formation recieved; however, the Enter key does not fire this event as it sh
ould. Can anyone give me some help as to why the Enter key won't fire the o
nTextChanged event?
MattIs the textbox the only input on the page? If so, I beleive there is a
known issue with the OnTextChanged not firing in this situation To work
around this place another control on the page, i.e. a button or another
textbox. If you want you can set Visible=False on this second input and it
should still work.
If using code behind also make sure your textchanged event is associated
with the textbox
i.e. in vb.net a "Handles" directive Private Sub
TextBox1_TextChanged() Handles.TextBox1.TextChanged
or
somewhere in the page init AddHandler TextBox1, AddressOf
TextBox1_TextChanged
If using in page code, there's something similar to the code behind but I
don't know what that is off hand.
"mdipiet" <mdipiet.1ovxtu@.mail.codecomments.com> wrote in message
news:mdipiet.1ovxtu@.mail.codecomments.com...
> I've got a form that is supposed to validate data entry from a bar code
> scanner. The scanner is set up to add a carriage return at the end of
> the data in the barcode, which should fire the onTextChanged event to
> validate the information recieved; however, the Enter key does not fire
> this event as it should. Can anyone give me some help as to why the
> Enter key won't fire the onTextChanged event?
> Matt
>
> --
> mdipiet
> ---
> Posted via http://www.codecomments.com
> ---
>

0 comments:

Post a Comment