Posted on: 10/8/2013 2:21:16 PM | Views : 824

I have a Webform that does the following:
A 3D-Barcode scanner reads a barcode into a textbox (Autopostback = true). The information is displayed on the screen, while the textbox is resetted and ready for the next scan. I achieved this with
- Barcode.Focus() on Page_load
- Gridview Event: OnRowDataBound="DataRefresh" and the code     void DataRefresh(Object sender, GridViewRowEventArgs e)  { Barcode.Text = string.Empty; Barcode.Focus(); }
This works fine: the textbox input field is resetted after each scan, and the focus set correctly too.
Now, if I subsequently scan the SAME barcode, having the same information displayed in the Gridview for both scans, then after the second scan the event is not fired anymore and therefore the textbox is not resetted which causes an error in the next scan.
Any idea how to fix this?
Martin
...

Go to the complete details ...