Posted on 2014-03-18
We have a .NET application to register items in a large archive. The location in the archive is a combination of room, section, and shelf. Presently the item number and location is entered manually in the archive system but we want to switch to barcodes - a location will have a barcode and an item in the archive will have as barcode.
On a webform we have two textboxes and a button and want to perform this:
1/ Focus is set on the first textbox.
2/ The items barcode is scanned and the scanned value goes in the first textbox.
4/ The location barcode is scanned and the scanned value goes in the second textbox.
I have tried this:
TextBox1.Attributes.Add("onkeydown", "document.getElementById('" & TextBox1.ClientID & "').value=''; document.getElementById('" & TextBox2.ClientID & "').focus();")
but when I scan in TextBox1, focus is moved to TextBox2 and the scanned value is transferred to TextBox2 but should be transferred to TextBox1 before focus is changed.