3

I have a textbox on an asp.net page. I use a barcode scanner to get the barcode number into that textbox. I need to then automaticaly fire an event directly after the text box recieves that input. the only event that is exposed is the TextChanged event which doesnt achieve what i need. I am using c# for the code behind.

Regards

skaffman
  • 398,947
  • 96
  • 818
  • 769
Roooss
  • 626
  • 1
  • 9
  • 24
  • 1
    http://stackoverflow.com/questions/1362284/how-to-fire-textbox-textchanged-event-on-jquery-onkeyup – Mitch Wheat Feb 07 '11 at 09:33
  • Perhaps you can explain *why* TextChanged doesn't achieve what you need. Also, if the barcode scanner is a keyboard hook driver, there may be no way for your page to determine that the barcode entry is complete. – Damien_The_Unbeliever Feb 07 '11 at 09:36
  • I think they usually send a magic key before and after sending the input. – CodesInChaos Feb 07 '11 at 10:31
  • 1
    @CodeInChaos -- that completely depends on how the scanner is configured. Every USB scanner that I have worked with comes out of the box simply emulating a keyboard with no special prefix/suffix. – Scott W Feb 07 '11 at 14:46

1 Answers1

5

Use TextChanged event with AutoPostBack=true.

Also ensure that your scanner sends a carriage return after scanning(normally with scanning a code from the manual).

Tim Schmelter
  • 450,073
  • 74
  • 686
  • 939