Implementing barcode scanning support in ASP.NET web applications

Posted: (EET/GMT+2)

 

In a recent project I needed to implement barcode scanning support to a web application. It turns out that many (most?) barcode scanner simply look like a keyboard to the computer, and thus, scanning a barcode to an input field on a web application is pretty much trivial.

Additional niceties include the fact that barcode scanners can usually be configured to send the Enter key after the barcode has been scanned. This allows the HTML form to be easily submitted.

So, in case you end up in a similar situation, the problem is usually very easily solved – if a web solution is suitable. Perhaps a few lines of TypeScript code to make the user experience nicer, and you are done! In case you need to work with scanners in the desktop world, check out this article on MSDN.