Click to See Complete Forum and Search --> : Textbox autotab or (set)focus advice


conners
02-18-2009, 02:46 PM
I have created my first (small) asp.net website which is used on a barcode scanner. One page of the site has 4 textboxes on it which the user scans the barcodes into.

The thing that I'm stuck on is when the user scans a barcode (or anything) the focus needs to move on to the next textbox in the tab order.

Also, there is another thing, when the page opens I want the focus to go to the 1st textbox. I have actually put the following code into the page_load (or page_open) event but it doesn't seem to do the trick:
textbox1.focus

Just so you know I'm using Visual Web Developer 2008 Express with VB code and ASP.net 3.5.

Thanks

conners
02-19-2009, 10:34 AM
Does anybody know if its possible to interact with a barcode scanner? if so, how?

Thanks

Hack
02-19-2009, 12:09 PM
It is certainly possible to interact with a barcode scanner. It is done all the time.

However, how you interact differs from one barcode scanner to the next.

Information on how to interact with this device is something that you need to get from the vendor. If it is possible to user ASP/VB.NET with their device, they should have an SDK that you can obtain.

getsach
02-20-2009, 04:50 AM
Page_Load()
TextBox1.Focus()

is working on my machine.. or else
you can also use the javascript code
body onload event to setfoucs

document.getElementById("TextBox1").focus();