Scan a bar code inside a textbox and firing textboxChanged asp.net

dobroe

New Member
I have a textbox inside a update panel:\[code\]<asp:TextBox ID="txtInsert" runat="server" Font-Size="Large" MaxLength="13" Width="150px" onkeyup="doPostBack(this);" AutoPostBack="True" OnTextChanged="txtInsert_TextChanged"></asp:TextBox>\[/code\]and this textbox should get the value from scanning a barcode. All the bar codes have 13 digits. in the txtInsert_TextChanged method i check if the value scanned in inside a table and display a message and delete the textbox value.The problem is that sometimes it only reads 1 character or 4 characters, sometimes i have 13 digits but they are made out of 2 barcodes combined. Basically i think i have to somehow increase the time for key up since it only reads part of the bar code and then combines it with a second bar code read...and by the way : the doPostBack(this) method is here:\[code\]<script type="text/javascript"> function doPostBack(o) { __doPostBack(o.id, ''); }</script>\[/code\]Any ideas ?PS: the scanner doesnt trow an ENTER at the end...
 
Back
Top